This is the mail archive of the
cygwin
mailing list for the Cygwin project.
export arrays in cygwin ksh
- From: bob <robert dot lambert at ae dot ge dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 23 May 2006 14:36:30 +0000 (UTC)
- Subject: 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/