This is the mail archive of the cygwin@cygwin.com 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]

Arrays in Cygwin?


Howdy all!

How can I get arrays in Cygin's Bash?

I did a search in Google search and found this reference to "Cygwin array
patch".
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=551009&group_id=
5470

Is this what I need?

The excerpt below shows the error I get from trying to run a script with an
array in it.

Rob
:)

Robert Mark Bram@DIJONG /home/Rob/
$ cat ass1.sh

# array variables declaration
# different file types
type=( "Image File" "Text File" "Sound Clips")

# store the application for files
program=( "xv" "vi" "showaudio")

# store the extension of the file types
exten=( "*.gif *.jpg *.bmp" "*.txt *.doc" "*.wav *.mp3 *.mid")

# initalise variable to 0
toQuit=0


Robert Mark Bram@DIJONG /home/Rob/
$ sh ./ass1.sh
./ass1.sh: 4: Syntax error: word unexpected (expecting ")")


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]