Aug 17, 2007 #1 uuperl Programmer Joined Feb 20, 2006 Messages 33 Location US Hi, #!/bin/sh set -A line1 two three four five set -A line2 a b c d e f print "Enter your array name" read arrayname print ${$arrayname[0]} Question: Can I use $arrayname? Somehow it does not work. thanks!
Hi, #!/bin/sh set -A line1 two three four five set -A line2 a b c d e f print "Enter your array name" read arrayname print ${$arrayname[0]} Question: Can I use $arrayname? Somehow it does not work. thanks!
Aug 17, 2007 Thread starter #2 uuperl Programmer Joined Feb 20, 2006 Messages 33 Location US I got the solution from another post in this forum: should be: eval print \${$arrayname[0]} Upvote 0 Downvote