> I've got a "run-parts" shell script that runs all executables in a directory > that I use. > > -- snip active bit-- > for i in $1/* ; do > [ -d $i ] && continue > if [ -x $i ]; then > $i > fi > done > -- end section -- > > However what I want to happen is if I press ctrl-c (SIGINTR 2) > that my "run-parts" script doesn't stop, but the presently running script > below stops. > > do I simply get my run-parts script to ignore ctrl-c > (ie trap "" 2) > > or is it more complicated than this...
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 Hope that helps, Martin -- Martin McCarthy /</ http://www.theasis.co.uk [EMAIL PROTECTED] \>\ http://www.ancient-scotland.co.uk /</ http://www.non-prophet.org _______________________________________________ Scottish mailing list [EMAIL PROTECTED] http://mailman.lug.org.uk/mailman/listinfo/scottish