On Thursday 12 December 2002 02:27 pm, Sherwin Daganato wrote:
> Randal Schwartz, the perl hacker, calls this "useless use of less".
> You probably mean
>
> for var in *; do echo $var; done

hmmm, i didn't know that bash treated the asterisk like that.  a little
better for my purposes though (the problem had to do with filenames or
directory names with spaces in them) is to add double quotes where
necessary, e.g.

for var in *;do echo "$var";done

of course i usually do more than just echo "$var", the echo is just
for demonstration purposes.  but putting the $var in double quotes
preserves directory or file names that have spaces in them.

thanks for the pointer.  is there no "ls" way to do this though?
using ls is just more logical, using * that way is magical.  and 
eventually i forget magic. 

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]

Reply via email to