[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
passing array to command line argument.
From: |
Dolphin06 |
Subject: |
passing array to command line argument. |
Date: |
Tue, 9 Dec 2008 05:20:59 -0800 (PST) |
Hello i would like to pass an array to my script command line argument, but
only the first element of the array is displayed. Here is my process :
script1:
my_array=(el1 el2 el3)
script2 -f $my_array
script2:
while getopts ":f:" opt ; do
case $opt in
f ) arr="$OPTARG" ;;
esac
done
echo "arr : ${arr[@]}"
--
View this message in context:
http://www.nabble.com/passing-array-to-command-line-argument.-tp20914576p20914576.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.
- passing array to command line argument.,
Dolphin06 <=
- Message not available