[2003-01-18 05:09] James Manning said:
| > [Michael Mueller]
| > Anybody think of another way to accomplish this?
| 
| killall -0 procname and check $?
| pidof procname and check $? or check for output
| 
| jmm@xanex:/home/jmm> for i in bash xxx; do
| > killall -q $i && echo There is a $i process running
| > done
| There is a bash process running
| jmm@xanex:/home/jmm>

or pidof(8) could be used...

sh$ if pidof $someproc >/dev/null 2>&1; then
  >   echo "$someproc is running"
  > fi
bash is running

  b

-- 
"Develop your talent, man, and leave the world something. Records are 
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing."  -- Duane Allman
_______________________________________________
TriLUG mailing list
    http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ:
    http://www.trilug.org/~lovelace/faq/TriLUG-faq.html

Reply via email to