On 3/28/11 12:03 PM, tytus64 wrote:

> 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
> }

You might have better luck moving the trap command inside the { ... },
before the while loop.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to