Re: shell script question

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Jeremy C. Reed
Date:  
To: david, Main PLUG discussion list
Subject: Re: shell script question
On Mon, 31 Jul 2006, David wrote:

> pid=`/bin/ps -e | grep process_name | grep -v mon | grep -v grep | sed
> -e 's/^ *//' -e 's/ .*//' | head -1`


There is a possibility that the return is empty (so the variable named
"pid" does not have a value).

>     if [ "X$pid" != "X" ]


So check here.
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss