Re: Is a process running ?

2003-07-28 Thread Kees Cook
John T. Williams wrote: ps -A | grep -e "[ /]python2.1\>" 1> /dev/null 2> /dev/null A quick short-cut for the last part: ps -A | grep -e "[ /]python2.1\>" >/dev/null 2>&1 "1" (stdout) is used by default, and then 2>&1 takes "2" (stderr) and sends (>) it to the same location (&) as "1". -- Kees

RE: Is a process running ?

2003-07-28 Thread Tim Fletcher
Thanks very much, works great :) Tim > -Message d'origine- > De : John T. Williams [mailto:[EMAIL PROTECTED] > Envoyé : lundi 28 juillet 2003 15:14 > À : [EMAIL PROTECTED]; [EMAIL PROTECTED] Kernel. Org > Objet : Re: Is a process running ? > > > So

Re: Is a process running ?

2003-07-28 Thread John T. Williams
Message - From: "Tim Fletcher" <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED] Kernel. Org" <[EMAIL PROTECTED]> Sent: Monday, July 28, 2003 2:20 AM Subject: Is a process running ? > > Hi all, > > i would like to write a simple shell script that checks f

Is a process running ?

2003-07-28 Thread Tim Fletcher
Hi all, i would like to write a simple shell script that checks for the existence of a certain programme, in this case python2.1. if the programme is active, do nothing, if not, start it. i did think of doing a ps -A |grep python2.1, but then i have no idea how to intergrate that in the shell