--- abhishek jain <[EMAIL PROTECTED]> wrote: [...] > #!/bin/bash > > if [`ps -e | grep 'run_process.sh' | grep -v 'grep' | head -n 1` -eq > ''] > then > `/home/abhishek\ jain/scripts/run_process.sh >output.log > 2>error.log` > else > #Do nothing > echo "jain" > > fi
Learn a scripting language, and quit spawning multiple processes. Please think of the wasted CPU cycles. Perl is probably overkill, but the `ps...| head -n 1` can be replaced with `ps -e | gawk '/run_process.sh/{print; exit}'` Regards, Gora __________________________________________________________ Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com _______________________________________________ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/