On Wed, 2008-01-30 at 15:36 +0530, Puneet Lakhina wrote:
[...]
> However
> $> TESTARR=(`echo \"abc def\" ghi`)
> $> echo ${TESTARR[0]}
> $> echo ${TESTARR[1]}
> This incorrectly prints:
> "abc
> def"
[...]

What you want is probably
  eval TESTARR=(`echo \"abc def\" ghi`)

I would also suggest moving to a better scripting
language like Python or Perl.

Regards,
Gora


_______________________________________________
ilugd mailinglist -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Next Event: http://freed.in - February 22/23, 2008
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/

Reply via email to