Dec 29, 2006 #1 marrow Technical User Jul 20, 2001 425 US value=25 If [ value = 25 ] then... # this works OK But also in ksh If [ value -gt 24 ] then.... # does not work. Any advice please? Is -lt or -gt not vaid in ksh?
value=25 If [ value = 25 ] then... # this works OK But also in ksh If [ value -gt 24 ] then.... # does not work. Any advice please? Is -lt or -gt not vaid in ksh?
Dec 29, 2006 1 #2 PHV MIS Nov 8, 2002 53,708 FR Perhaps this ? If [ [!]$[/!]value -gt 24 ] Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
Perhaps this ? If [ [!]$[/!]value -gt 24 ] Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Dec 29, 2006 #3 hoinz MIS Jan 29, 2004 944 DE In addition to PHV's answer: There seems to be a bug in your first example; you are testing if strings "value" and "25" are the same ... Upvote 0 Downvote
In addition to PHV's answer: There seems to be a bug in your first example; you are testing if strings "value" and "25" are the same ...
Dec 29, 2006 #4 feherke Programmer Aug 5, 2002 9,540 RO Hi In addition, please write the [tt]if[/tt] with lowercase i. Looks better on a forum for computer professionals. Feherke. http://rootshell.be/~feherke/ Upvote 0 Downvote
Hi In addition, please write the [tt]if[/tt] with lowercase i. Looks better on a forum for computer professionals. Feherke. http://rootshell.be/~feherke/
Dec 29, 2006 Thread starter #5 marrow Technical User Jul 20, 2001 425 US Thanks for your help and apologies for the typos. Upvote 0 Downvote
Dec 31, 2006 Thread starter #6 marrow Technical User Jul 20, 2001 425 US Now working, needed VARIABLE as suggested, thanks again for reply. Upvote 0 Downvote