Chet Ramey wrote: > > > Sure. Trap it to SIG_IGN: `trap "" SIGHUP'. > >
OK. Thanks everybody for their input. Really appreciate all the answers. I modified the first loop as follows to get the subshell to ignore HUP signal: trap "" HUP; cat $log_file | { while read line do line_num=`expr $line_num + 1` echo $line_num: $line >> ./out.log done } -- View this message in context: http://old.nabble.com/bizarre-trap-behavior-while-reading-a-file-tp31242064p31259743.html Sent from the Gnu - Bash mailing list archive at Nabble.com.