![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Condition test | felixwhoals | UNIX for Dummies Questions & Answers | 2 | 12-22-2007 08:47 AM |
| Condition test ( [[ ]] ) doubt | thambi | Shell Programming and Scripting | 2 | 08-17-2007 02:52 AM |
| test and if condition | ciroredz | Shell Programming and Scripting | 9 | 06-27-2007 09:17 AM |
| need help with test condition in shell script | pieman8080 | Shell Programming and Scripting | 9 | 09-11-2006 05:20 PM |
| Bad day !! test condition failed --need a one liner to do --help | jambesh | Shell Programming and Scripting | 13 | 09-06-2006 08:55 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Test condition
Hello,
what is the better and correct way to perform a comparison: I have been using the following with no problems: if [[ $a = "" ]] then .... fi I have seen this also used : if [ $b -eq 1 ] then .... fi When I try : if [ $a = "" ] then .... fi I get an error like .... the test condition expects a parameter. Can anybody explain? Is it due to the data types and different type allow different comparison constructs? Thanks! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|