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]

Reply via email to