[CentOS] simple if statement

Fri Feb 27 13:59:10 UTC 2009
Kevin Krieser <k_krieser at sbcglobal.net>

You don't really need to prepend the x if the $remaining is in quotes,  
do you?  If you didn't use quotes, then you could end up with a error  
if $remaining isn't set.

On Feb 27, 2009, at 5:24 AM, Ralph Angenendt wrote:

> Tom Brown wrote:
>> Hi
>>
>> Below if $remaining is empty i want the if to finish - what is it i  
>> need
>> to put in SOMETHING?
>>
>> if [ "$remaining" = "" ] ; then
>>            SOMETHING ;
>>        else
>>            kill -9 $remaining
>> fi
>
> if [ "x${remaining}" != "x" ] ; then
>              kill -9 ${remaining}
> fi
>
> Ralph
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos