[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with how to assign an array

From: Steven W. Orr
Subject: Re: Problem with how to assign an array
Date: Fri, 25 Feb 2011 13:25:53 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20101207 Thunderbird/3.1.7

On 2/25/2011 4:22 AM, Andreas Schwab wrote:
"Steven W. Orr"<address@hidden>  writes:

517>  r=($(eval echo "address@hidden"))

If you use $(eval echo ...) you are almost always doing it wrong.

eval "r=(\"address@hidden")"


Thanks. I changed things of the form

r=($(eval "echo "address@hidden""))
eval "r=(\"address@hidden")"

One place where I can't see how to eliminate the construct is where I pass in the name of an array and parse it using set

set -- $(eval echo \"address@hidden")

would I be better off with something like

eval "set -- \"address@hidden""



Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net

reply via email to

[Prev in Thread] Current Thread [Next in Thread]