On Monday 25 March 2002 13:39, zentara wrote:
On Sun, 24 Mar 2002 21:39:38 +0100
Philipp Thomas
wrote: On Sun, 24 Mar 2002 09:17:24 -0500, you wrote:
Ok, that is just a simple use of find find . -name "*.jpg" ;;
Nope, that won't keep the shell from expanding the wildcard. Either use single quotes or a backslash to inhibit wildcard expansion:
find
-name \*.jpg find -name '*.jpg' Hmmm, find . -name "*.jpg" works for me with output identical to \*.jpg or '*.jpg' . Wonder why? I'm using bash from suse7.2.
It's standard shell behaviour. Expansion of the wildcards is done by the shell before it tries to execute the command. If you have a file in the current directory ending in jpg then the shell finds it and expands it on the command line. If there is no file that the shell can expand to the entire expression is passed to find. You can test this with the exact same command, but first create a jpg file in the current directory (touch trash.jpg). Then you will only find that one file (or any other file with the exact same name.) Regards, jimmo -- --------------------------------------- "Be more concerned with your character than with your reputation. Your character is what you really are while your reputation is merely what others thing you are." -- John Wooden --------------------------------------- Be sure to visit the Linux Tutorial: http://www.linux-tutorial.info --------------------------------------- NOTE: All messages sent to me in response to my posts to newsgroups or forums are subject to reposting.