|
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
|