[lug] More script questions

winrip winrip at speakeasy.org
Thu Apr 27 13:58:19 MDT 2000


  Is there a way to force a pid to a program?  Or how would one be able to
assign a pid to a variable at run time so that the pid is known to the script.

Example of what I'm doing, my program has two pids, and 

ps x|awk '/PROGRAM/ {print $1}' 

adds an extra pid for the awk statement, so I piped "head -2" to the end of the
statement and get the pids I need.  But, now I need both pids known to the
script and a test to make sure there are two pids. the conditional test
shouldn't be any trouble it's just the assigning of pids to variables that
gets me.  


Any ideas?
Thanks 
Bill




More information about the LUG mailing list