Return to Snippet

Revision: 6191
at May 6, 2008 06:22 by wolfie


Initial Code
Note that this works for a shell script that runs a perl script with a parameter (see related tip)

batch_name is the name of the perl script that is being run. This can be abbreviated to whatever will uniquely identify it in grep
param_file is the name of the file that parameters are taken from. This needs to be the full name (e.g. param_file.txt)


  ps -ef |grep batch_name |awk '{print "grep -n " $10 " param_file"}'|sh

Initial URL


Initial Description
Useful if you have a shell script running lots of the same command and want to know how many of them have been done

Initial Title
Determine which number out of a list is being processed at the moment

Initial Tags
Bash

Initial Language
Bash