risby
Programmer
- Feb 27, 2002
- 84
Has anybody seen this Korn shell syntax for a for loop
An employee of the company I'm working for at the moment just asked me why he got a "syntax error: `((' unexpected" message.
I showed him how to do it as a while loop but I am intrigued as to which version of Korn shell might support this syntax.
My O'Reilly "Learning the Korn Shell" (c) 1993 does mention a c style arithmetic for loop as a future feature.
It isn't available in the PD KSH v5.2.14 99/07/13.2 that I have.
==========================================
I phoned the local ramblers club today, and this bloke just went on and on.
Code:
for (( i=0; i<10; i++ ))
do
print $i
done
I showed him how to do it as a while loop but I am intrigued as to which version of Korn shell might support this syntax.
My O'Reilly "Learning the Korn Shell" (c) 1993 does mention a c style arithmetic for loop as a future feature.
It isn't available in the PD KSH v5.2.14 99/07/13.2 that I have.
==========================================