sjl@amdahl.UUCP (Steve Langdon) (03/29/85)
Rewriting the script to use ksh integer arithmetic (see below) adds the following times. > Shell -Amdahl 470 V/8- ----Vax11/780--- > UTS/V (SVR2) 4.2 bsd > User System Total User System Total > csh 1.21 0.38 1.59 11 4 15 > sh 0.96 1.76 2.72 25 138 163 > ksh 0.91 2.05 2.96 -- -- -- new ksh 0.16 0.05 0.21 -- -- -- #!/bin/ksh integer x=1 while (( $x < 100 )); do ((x = $x + 1)) if (( $x > 10 )); then echo Hi! $x fi done -- Stephen J. Langdon ...!{ihnp4,hplabs,sun,nsc}!amdahl!sjl [ The article above is not an official statement from any organization in the known universe. ]