This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Problem with shell script
- From: Marek <mkierebi at o2 dot pl>
- To: cygwin at cygwin dot com
- Date: Sun, 24 Jul 2005 21:13:02 +0200
- Subject: Problem with shell script
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?
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/