![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| shell problem not working!!! :(( | baku | Shell Programming and Scripting | 1 | 04-10-2008 09:20 AM |
| Shell script is not working... | vishalpatel03 | Shell Programming and Scripting | 2 | 01-10-2008 05:19 PM |
| how to find in which shell i am working.. | pineapple | Shell Programming and Scripting | 2 | 04-01-2007 11:56 PM |
| shell not working | hytechpro | Shell Programming and Scripting | 0 | 01-25-2006 02:19 AM |
| bourne shell not working | gillbates | Shell Programming and Scripting | 6 | 06-17-2004 05:22 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
if -z not working in SH shell
Hello all,
Any idea how to check whether a variable holding null value or not. if -z option works fine in bash, where as it is not working in sh. bash-3.00$ sh $ TEST= $ if [ -z $TEST ] ; then > echo "Null" > else > echo "Not null" > fi sh: test: 0403-004 Specify a parameter with this command. Not null $ The test fails. The same works in bash. bash-3.00$ TEST= bash-3.00$ if [ -z $TEST ] ; then > echo "Null" > else > echo "Not null" > fi Null bash-3.00$ I need this testing working in sh. Please help. Thanks, Rijesh. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|