bash wildcard expansion

Christopher Faylor cgf@redhat.com
Thu Dec 21 18:31:00 GMT 2000


On Thu, Dec 21, 2000 at 08:40:02PM -0500, Puttkammer, Roman wrote:
>>I hope i'm not getting flamed for this one, but what am I missing? A 
>command line argument is being expanded by bash even though it's escaped.
>> /tibrv/src/examples/java# D:/jdk1.3/bin/java.exe \*
> Exception in thread "main" java.lang.NoClassDefFoundError:
>cmlistener/class
>>"cmlistener.class" is the first filename in the directory.
>>Same thing if i'm using single quotes to escape. Note that java.exe does not
>expand arguments itself; it works as expected from a DOS shell:
>> D:\TIBCO\TIBRV\src\examples\java>java "*"
> Exception in thread "main" java.lang.NoClassDefFoundError: *
>>"ls '*'" or "ls \*" works as expected ("ls: *: No such file or directory".)
>>roman
>> Cygwin DLL version: 1001 / 6
> GNU bash, version 2.04.0(1)-release (i586-pc-cygwin)

The fact that you notice that ls works as expected should be a pretty
large clue.
ls.exe is a cygwin program. java.exe is not a cygwin program. You
can't expect jave.exe to work well with a cygwin application like bash.
In this case, java.exe is expanding the command line '*' itself, just
like any non-cygwin MS-DOS application does.
cgf
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /