![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| please explain the below | mail2sant | Shell Programming and Scripting | 1 | 04-04-2008 05:04 AM |
| Please can any one explain this ${0##/} | gadege | Shell Programming and Scripting | 2 | 04-01-2008 12:26 PM |
| please explain this | dummy_needhelp | Shell Programming and Scripting | 2 | 10-14-2007 10:17 PM |
| Can anyone explain plz | r_W213 | UNIX for Advanced & Expert Users | 3 | 03-27-2007 01:52 AM |
| Explain awk | hitmansilentass | Shell Programming and Scripting | 4 | 09-27-2006 11:14 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
I thought it means if the return code of the previous command not equal to 0...
Is this correct? |
| Forum Sponsor | ||
|
|
|
|||
|
The numeric comparisons for korn shell are
numA -eq numB - True if numA and numB are equal numA -ne numB - True if numA and numB are not equal numA -lt numB - True if numA is less than numB numA -gt numB - True if numA is greater than numB numA -le numB - True if numA is less than or equal to numB numA -ge numB - True if numA is greater than or equal to numB the string comparisons for korn shell are strA = strB - True if strA matches strB strA != strB - True if strA does not match strB strA < strB - True if strA comes before strB in a dictionary order strA > strB - True if strA comes after strB in a dictionary order So your example says to run the commands between then and fi or else if the return code of the previous command is equal to zero (0). Carl |
|||
| Google The UNIX and Linux Forums |