[ILUG] shell script question

Niall niall at inpho.ie
Wed May 3 13:36:28 IST 2000


On Wed, 3 May 2000, John N S Gill wrote:

> Following works in bash:
> 
> i=0
> while [ $i -lt 256 ]; do
>   echo $i
>   i=$(( $i + 1 ))
> done

Whoops - sure makes my concatenating variables thing look every bit as bad
as it is. But of course this won't work in sh (ssh! - don't mention expr -
anyway, thing of the overhead of all those expr calls :-) )


Regards,

Niall






More information about the ILUG mailing list