in reply to Getting Process ID from process name

Here is an old snippet that has been passed around here before. I'm sure you could figure out how to grep the array for your $process_name.
#!/usr/bin/perl my @ps = qx(ps -u $> -o pid,tname,etime,cmd --no-headers); for (@ps) { ($pid, $tname, $etime,$cmd) = unpack "a5 x a11 x a8 x a200",$_; print "$pid $tname $etime $cmd\n"; }

I'm not really a human, but I play one on earth. flash japh