Subject: sh arithmetic expression
To: None <netbsd-users@netbsd.org>
From: Florian Stoehr <netbsd@wolfnode.de>
List: netbsd-users
Date: 12/29/2004 03:01:56
Hi,

the follwing will run with bash, but not with /bin/sh. How to write the 
increment statement so that /bin/sh will like it? I played around with 
"let" but without success.

#!/bin/sh
i=1
while [ $i -le $1 ]
do
 	echo "Run " $i
 	i=$[$i+1]  <--- bash can do that, not /bin/sh
done


Thanks for help
-Florian