This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: bash wildcard expansion


> -----Original Message-----
> From: Christopher Faylor [mailto:cgf@redhat.com]
> Sent: Thursday, December 21, 2000 9:31 PM
> To: 'cygwin@cygwin.com'
> Cc: roman.puttkammer@multex.com
> Subject: Re: bash wildcard expansion
> 
> 
> 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
> >
> > ...
> 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.


I see. Is there any way of achieving the same under cygwin as the
following command does under dos?

	java myclass "*"

This results a litteral asterix being passed to the class. I figgured
that in this case, under cygwin one of following commands

	java myclass '"*"'
	cmd /c java test '"*"'
	cmd /c 'java test "*"'

should have the same effect. But they don't - the double quotes are
not stripped from the argument (which java.exe seems to be doing when
invoked from DOS.)

Is there any way to get the same behaviour under cygwin?

thanks,
roman

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]