How can I iterate through a simple range of ints using a for loop in ksh?
For example, my script currently does this...
for i in 1 2 3 4 5 6 7 do
The following will work on AIX / Linux / Solaris ksh.
#!/bin/ksh d=100 while (( $d < 200 )) do echo "hdisk$d" (( d=$d+1 )) done
Optionally if you wanted to pad to 5 places, i.e. 00100 .. 00199 you could begin with:
#!/bin/ksh typeset -Z5 d
-Scott