Re: simple if statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> A ":" on it's own will do what you want.
>
>   if [ "$remaining" = "" ]
>   then
>     :
>   else
>     kill -9 $remaining
>   fi
>
> But better would be
>
>   if [ -n "$remaining" ]
>   then
>     kill -9 $remaining
>   fi
>
>   

thanks to all for the suggestions
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux