1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# log function for displaying output if loging enabled _log() { # only output something, # if logging is enabled if [ $LOGGING -eq 0 ]; then if [ -n "$1" ]; then # echo arguments echo "$@" else # echo stdin cat fi fi }