On Wednesday 25 August 2004 11:08, Martin McCarthy wrote:
>
> You'll probably want to untrap the ^C for the child script.  Something
> like:
>
> trap '' 2
> for i in "$1"/* ; do
>         [ -d "$i" ] && continue
>         if [ -x "$i" ]; then
>                 ( trap 2; "$i" )
>         fi
> done
>

I'm a bit hazy on the whole trap thing - I'd have tried running the child in 
in the background and using wait to ensure jobs run sequentially.

for i in "$1"/* ; do
         [ -d "$i" ] && continue
         if [ -x "$i" ]; then
                $i &
                wait
         fi
done

Doesn't mean that Martin's suggestion is wrong (or that mine is right ;-)

C. 

_______________________________________________
Scottish mailing list
[EMAIL PROTECTED]
http://mailman.lug.org.uk/mailman/listinfo/scottish

Reply via email to