![]() |
|
|
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 |
| Test condition | gio001 | Shell Programming and Scripting | 4 | 10-28-2008 05:57 PM |
| 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 03:52 AM |
| test and if condition | ciroredz | Shell Programming and Scripting | 9 | 06-27-2007 10:17 AM |
| need help with test condition in shell script | pieman8080 | Shell Programming and Scripting | 9 | 09-11-2006 06:20 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
test condition
Hi there, I tried to search for this almost everywhere, but didnt get any proper information on it. What is the difference between Code:
[[ ]] [ ] Some of the code works when I have only single condition i.e. Code:
[[ -z $arg1 ]] && $dothis1 || $dothis2 But if i try to include another testcondition to the above code like below Code:
[[ -z $arg1 -a -n $arg2 ]] && $dothis1 || $dothis2 This works when I replace with single square brackets Code:
[ -z $arg1 -a -n $arg2 ] && $dothis1 || $dothis2 Why is that so? |
| Bookmarks |
| Tags |
| shell script, shell scripting, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|