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]

export arrays in cygwin ksh


Help

Trying to use ksh and export arrays in cygwin.  It works on my unix workstation 
but not on PC cygwin.  Any help would be appreciated.  Tried to post earlier 
and it did not make it apparently.

Thanks
Bob

#!/bin/ksh
echo "in test1"
vname[1]="Dog"
vname[2]="Cat"
for i in 1 2
do
   echo "vname[$i]=${vname[$i]}"
done
export vname[*]
test2 

#!/bin/ksh
echo "in test2"
for i in 1 2
do
   echo "vname[$i]=${vname[$i]}"
done


Output:
test1
in test1
vname[1]=Dog
vname[2]=Cat
./test1: line 8: export: `vname[*]': not a valid identifier
in test2
vname[1]=
vname[2]=



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