[CentOS] simple if statement
Stephen Harris
lists at spuddy.orgFri Feb 27 14:07:25 UTC 2009
- Previous message: [CentOS] simple if statement
- Next message: [CentOS] simple if statement
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Feb 27, 2009 at 11:14:01AM +0000, 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 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 -- rgds Stephen
- Previous message: [CentOS] simple if statement
- Next message: [CentOS] simple if statement
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list