I just double checked myself...to be sure...
Yeah, if you do a find with an asterisk, it will be expanded... Its
especially problematic if the directory from which you are issuing a
find contains a file that meets expansion...
Alexey N. Solofnenko wrote:
At least on Cygwin, Bash does not expand asterisk, if there are no
matching files. I thought this is a new "standard" behaviour.
- Alexey.
Scot P. Floess wrote:
No, bash is the same way...
You have to really do a find <dir> \*.jar
I was sorta wrong in what I was saying...find in this case is doing
the expansion (in the case where one escapes the asterisk)...
Dominique Devienne wrote:
$ rm *.txt # be carefull to run this in some temp dir
$ mkdir newdir
$ touch newdir/something.txt newdir/anotherthing.txt
newdir/yetanother.txt
$ find ./ -name *.txt
./newdir/something.txt
./newdir/anotherthing.txt
./newdir/yetanother.txt
It works as expected because the shell does not expand the asterisk.
This is not true for me, at least on Solaris with tcsh (and I suspect
traditional shells behave the same). The shell always expands the
asterisk, and reports an error (find: no match) when the asterisk
doesn't match any file in the current dir. The same with ls, etc...
--DD
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Scot P. Floess
27 Lake Royale
Louisburg, NC 27549
252-478-8087 (Home)
919-754-4592 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]