for loops
    Arthur S. Kamlet 
    ask at cbnews.att.com
       
    Sat Apr  6 07:57:07 AEST 1991
    
    
  
In article <robtu.670879801 at mexia> robtu at itx.isc.com (Rob Tulloh) writes:
>In the version of ksh running on the RS/6000, the following is possible:
>
>typeset -i FILES=10
>while [ $i -gt 0 ] ; do
>	# body of loop
>	FILES=FILES-1
>done
>
>The typeset -i forces FILES to be interpreted as an integer and allows
>you to forgo the use of $var and the let syntax.
In fact,  my ksh  comes with an exported alias for typeset -i
named "integer"
So I can say:
 integer FILES=10
-- 
Art Kamlet  a_s_kamlet at att.com  AT&T Bell Laboratories, Columbus
    
    
More information about the Comp.unix.shell
mailing list