From: Alfie Costa (agcosta@gis.net)
Date: Mon Sep 18 2000 - 01:10:08 CEST
On 17 Sep 2000, at 9:42, Michele Andreoli <mulinux@sunsite.auc.dk> wrote:
> > eval set -- 'a "b c" d e'
> > for f in "$@"
> > do
> > echo $f
> > done
> >
> > a
> > b c
> > d
> > e
>
> This is also my typical problem. In your example: removing "eval" and
> removing the two ' works anyway?
Well, that is true, and I hadn't noticed it. It is not a good example maybe.
However, with the backquotes example, it still doesn't seem to work without
using 'eval'. In other words, I haven't figured out how to simplify this:
eval set -- `counter 1 2 1 \\\\\""C:\\\\\Windows\\\\\file number"".txt"\\\\\"`
for f in "$@"
do
echo $f
done
...Fortunately, it may not really matter that much. Most of the time the
'counter' script will being doing easy work, and not processing spaces. It's
just that when I first noticed the problem it seemed like it was a bug in the
program, a mystery. It took a little while to understand that it wasn't a bug
at all, it was simply the way the shell works.
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk
This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:15 CET