1. Such nonthing saying subjects normally get you an infraction. Rules are to use senseful subjects.
2. Please use code tags. It's no fun reading such scripts with no formatting. I edited your post - it now has code tags.
3. Please try it again with doube square brackets like:
4. Also to be sure maybe start using variables in this form:
5. Use set -x to debug your script
6. Use echo on your variables to debug your script
I try the way you told me but getting the following error
# ./robot.ksh
++ TRY=1
++ word1=
./robot.ksh: line 16: syntax error in conditional expression
./robot.ksh: line 16: syntax error near `-a'
./robot.ksh: line 16: `while [[ TRY -lt 4 -a "$word1" != "slot" ]]'
#
Quote:
Originally Posted by zaxxon
1. Such nonthing saying subjects normally get you an infraction. Rules are to use senseful subjects.
2. Please use code tags. It's no fun reading such scripts with no formatting. I edited your post - it now has code tags.
3. Please try it again with doube square brackets like:
4. Also to be sure maybe start using variables in this form:
5. Use set -x to debug your script
6. Use echo on your variables to debug your script
You try to compare a string/text with a number:
Problem is here:
Your variable $ERRORCODE has no number to be compared if it is less than 4, but it contains the string "TRY".