Try something like:
if{ps -elf | grep 'program_name' | wc -l} > 1 then 'program_name'
should be "running".
On Sun, 25 Jul 1999, Paul Murphy wrote:
> I am trying to write a script that tests if a certain program is
> running, I thought to use :
>
> if ( ps x | grep "program_name" }
>
> but this will ALWAYS return TRUE [from grep]. How to deal with this??
> --
> [EMAIL PROTECTED]
> http://www.geocities.com/PicketFence/1913/
>
> "I am not going to be happy until my living room looks like NORAD"
>
- Infinite Regression ? Paul Murphy
- Re: Infinite Regression ? David Rysdam
- Re: Infinite Regression ? rj
- Re: Infinite Regression ? Marc Mutz
- Re: Infinite Regression ? Senthilkumar Rajasekharan
- Re: Infinite Regression ? Kenneth Stephen
- RE: Infinite Regression ? LENGARD Pascal OCISI
- Re: Infinite Regression ? Greg Gorsiski
- Re: Infinite Regression ? Greg Gorsiski
- Re: Infinite Regression ? Greg Gorsiski
