I was wondering how to find out the pid of a (bash) script. Suppose it's called SCRIPT. Issuing pidof SCRIPT echoes nothing, yet ps x shows the pid of it something like /bin/bash ./SCRIPT. But then pidof "/bin/bash ./SCRIP" again does nothing. Simply saying pidof bash gives the (probably) right result but how many bash scripts could there be running at the same time!?
I'll tell you why I want to do this afterall (and maybe there's a better way of doing it, please tell me) -- another script/process/program or whatever must run exactly untill the first one finishes. I've figured it could be done like until [ -z `echo $(pidof some_program)` ] If the program isn't another script, it works. Otherwise? Thanks for the suggestions, andrej -- echo $(girl_name) > /etc/dumpdates