| On Tue, Mar 07, 2000 at 11:50:46AM +0100, Akim Demaille wrote:
| : | eval set $list
| : | while test $# -gt 0; do
| : |   echo $1
| : |   shift
| : | done
| : 
| : Excellent, thanks!  I think this is the best means to handle the list
| : here.
| 
| The most elegant solution I found (can't give it a rest already! ;) is:
| 
| eval set $list
| for elt in "$@"; do
|   echo $elt
| done
| 
| So there.  Now you won't get any more suggestions from me :)

I agree, this is perfect.  Now the question is, do we want to pollute
autoconf.sh, a maintainer tool, with portability issues?  If yes, we
need to

eval set dummy $list
shift
for elt in "$@"; do
  echo $elt
done

to be sure that if $list comes with `-e' first, set won't understand
it.

If we expect a good shell, then

eval set -- $list
for elt in "$@"; do
  echo $elt
done

is fine.

        Akim

Reply via email to