On Fri, 9 Feb 2007 10:51:29 +0100 Harald van Dijk <[EMAIL PROTECTED]> wrote: > That works with your ; approach too, as well as with the > newline-separated approach: > > replace=" > 4d 1280 768 24 > 5c 1400 1050 16 > " > > IFS='; > ' > #set -f > set -- ${replace} > #set +f > unset IFS > > for x ; do > .... > done
Yes, but consider this iwpriv_ESSID=" set AuthMode=WPAPSK; set EncrypType=TKIP; set WPAPSK=yourpasskey " One issue is that any valid character is allowed in WPAPSK, including ; $ foo="'one '\'' two' \ 'three ; four' \ 'five \ six' \ " $ eval set -- "${foo}" ; for x in "$@" ; do echo $x; done one ' two three ; four five \ six $ Demonstrates that we can achieve multi-line arrays like so, without the need to set shell opts or alter IFS Thanks Roy -- gentoo-dev@gentoo.org mailing list