On Wednesday, March 12, 2003, at 01:04 PM, Jeff Waugh wrote:


<quote who="Stewart">

# cat /etc/*{version,release}
cat: /etc/*version: No such file or directory
Red Hat Linux release 6.2 (Zoot)

i've not seen that syntax before. i shall now have to go and 'man cat'
to find out what it is I just did. :-)

cat(1) won't tell you, because the interesting things there were just standard shell globbing.

i kind of figured that after i thought about it for a bit. :)


man 3 glob will tell you a bit about it, but I'm
not sure of the best place (apart from the SLUG mailing list) to find good
information on globbing tricks.

googling for bash shell brace expansion did it for me...


A useful trick:

ls *.py{c,}

I'll leave working it out and posting the "answer" to you. :-)

heh. i'd hazard a guess that will list all files ending with .py and .pyc.


woo. you learn something new every day. thanks...

..S.

--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to