Re: [ILUG] shell script question

From: Niall (niall at domain inpho.ie)
Date: Wed 03 May 2000 - 13:36:28 IST


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



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:06:00 GMT