public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Setting Integer Variables in Bash
@ 2009-01-30  0:40 whitewall
  2009-01-30  0:51 ` Tim McDaniel
  2009-01-30  9:02 ` Mark J. Reed
  0 siblings, 2 replies; 4+ messages in thread
From: whitewall @ 2009-01-30  0:40 UTC (permalink / raw)
  To: cygwin


The text below is from a text file.  If I type the commands line-by-line in
the bash then the commands work as expected.  If I save the commands in a
text file and call the script I get the error message:
': not a valid identifier2: declare: 'Red
': not a valid identifier3: declare: 'Green

#! /cygdrive/c/cygwin/bin/bash
declare -i Red
declare -i Green
Red=10
Green=$Red+1
echo $Green
exit 0
-- 
View this message in context: http://www.nabble.com/Setting-Integer-Variables-in-Bash-tp21737864p21737864.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-30  0:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-30  0:40 Setting Integer Variables in Bash whitewall
2009-01-30  0:51 ` Tim McDaniel
2009-01-30  9:02 ` Mark J. Reed
2009-01-30  9:38   ` Tim McDaniel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).