On Thursday 12 December 2002 12:35 pm, Andre M. V. wrote:
> > i saw a trick to do this once, long ago. it had to do with putting
> > double quotes somewhere strategic, but i've forgotten the trick.
>
> for GNU ls, use -Q:
that's not the trick i've forgotten, but i'll take it :). thanks.
i still have a problem though, when i do:
mkdir test
cd test
mkdir "11 22"
mkdir "aa bb"
for fn in `ls -Q`
do
echo $fn
done
i get:
[tiger@tiger test]$ for fn in `ls -Q`; do echo $fn; done
"11
22"/
"aa
bb"/
i guess that's bash splitting on spaces. doing (note double quotes around
the `ls -Q`):
for fn in "`ls -Q`";do echo $fn;done
doesn't work as i expect, i get both directory names on the same
line, e.g.
"11 22"/ "aa bb"/
how would i get them one directory to a line?
thanks for the pointer to -Q though. that's definitely useful and i will
find a slot for it :).
tiger
--
Gerald Timothy Quimpo tiger*quimpo*org gquimpo*sni-inc.com tiger*sni*ph
Public Key: "gpg --keyserver pgp.mit.edu --recv-keys 672F4C78"
Veritas liberabit vos.
Doveryai no proveryai.
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]