This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Setting Integer Variables in Bash


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]