shell-base/modules/scripting/iecho.func
David Kebler b7b2d7061a improve module base - use stderr for error messages
helpers: added mkrfilename for making random file names instead of using mktemp
         remote_arg function escapes spaces within an arugment(s) for use passing remotely
2024-02-21 11:11:07 -08:00

17 lines
No EOL
329 B
Bash

#!/bin/bash
iecho () {
[[ ! -z "$PS1" ]] && echo "$@"
return 0
}
# no way to tell if sourced vs subshell
# # [[ ! -z "$PS1" ]] && [[ $SHLVL -eq 1 ]] && echo $1
# # echo [[ -z $PS1 ]]
# echo $SHLVL
# echo $$
# echo $BASHPID
# if [[ -t 1 ]]; then
# echo "Terminal"
# else
# echo "Not-a-terminal"
# fi