Redirezionare stdout di uno script anche in un file di log
Jump to navigation
Jump to search
Inserire all'inizio dello script:
# this one redirect stout to tee, which print to stdout and appends to logfile exec > >(tee logfile.txt)
# uncomment this if you want to also capture stderr exec 2>&1