Re: Problem with shell script

2005-07-25 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Marek on 7/24/2005 1:13 PM: > When I put commands below in command line: > i=1 > echo $i > i=$(($i+1)) > echo $i > > everything works well (i is incremented from 1 to 2), but when I run this as > a shell script the result is: > 1+1 inste

Re: Problem with shell script

2005-07-24 Thread René Berber
Marek wrote: > When I put commands below in command line: > i=1 > echo $i > i=$(($i+1)) > echo $i > > everything works well (i is incremented from 1 to 2), but when I run this as > a shell script the result is: > 1+1 instead of 2 > > How should I do incrementation in shell script? It depends o