public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: bash wildcard expansion
@ 2000-12-21 18:37 Puttkammer, Roman
  2000-12-21 19:04 ` Chris Abbey
  2000-12-21 19:12 ` friedman_hill ernest j
  0 siblings, 2 replies; 10+ messages in thread
From: Puttkammer, Roman @ 2000-12-21 18:37 UTC (permalink / raw)
  To: 'Dunn-Roberts, Richard', cygwin

sorry, my example could't have been worse: i just wanted to
illustrate that the asterix was being expanded (by the shell?)
even though it's escaped.

the problem is: when invoking

	java someclass \*

the \* is being expanded to the list of files in the current
directory (the class is invoked with a list of filenames rather
than with a "*".) AFAIK that shouldn't be.

roman

> -----Original Message-----
> From: Dunn-Roberts, Richard [ mailto:RICHARD.R.DUNN-ROBERTS@saic.com ]
> Sent: Thursday, December 21, 2000 9:06 PM
> To: cygwin@cygwin.com
> Subject: RE: bash wildcard expansion
> 
> 
> It looks to me as if the reason here is that cmlistener.class is being
> passed to java.  Java does not take the extension.
> 
> The correct command is > java cmlistener
> What is being issued is > java cmlistener.class
> 
> Since Java uses the dot as a path separator, it is looking for
> cmlistener/class.class
> 
> As to why it is working in dos, I don't know that answer to that.
> 
> I'm curious.  Why do you want to invoke the Java VM with 
> multiple class
> files on the command line.  Only the first would get 
> executed, I think, and
> the rest would be treated as command line arguments (String 
> args[]) to the
> first.
> 
> 
> Richard Dunn-Roberts
> Science Applications International Corporation
> 12479 Research Parkway
> Orlando, Florida, 32826-3248
> 
> richard.r.dunn-roberts@saic.com
> 
> vox:	(407) 207 2752
> fax:	(407) 277 5395
> 
> 
> 
> -----Original Message-----
> From: Puttkammer, Roman [ mailto:roman.puttkammer@multex.com ]
> Sent: Thursday, December 21, 2000 8:40 PM
> To: 'cygwin@cygwin.com'
> Subject: bash wildcard expansion
> 
> 
> 
> 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)
> 
> -- 
> To pour bottled sauce over salad is to miss the point of 
> salad altogether.
>                                      - Fairways, 
> advertisement for olive oil
> 
> This email message is for the sole use  of the intended 
> recipient(s) and may
> contain  confidential and  privileged information.  Any 
> unauthorized review,
> use,  disclosure or distribution is prohibited.  If you are 
> not the intended
> recipient,  please contact the sender by reply email  and 
> destroy all copies
> of the original message.
> Any views expressed in the email message  are those of the 
> individual sender
> except  where  the  sender  specifically states  them  to  be 
>  the views  of
> Multex.com, Inc.
> 
> Roman Puttkammer                                      
mailto:putt@multex.com
Multex.com, Inc.                                       http://www.multex.com
33 Maiden Lane                                         tel +1 (212) 859 9908
New York, NY 10038                                     fax +1 (212) 859 9810

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

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

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: bash wildcard expansion
  2000-12-21 18:37 bash wildcard expansion Puttkammer, Roman
@ 2000-12-21 19:04 ` Chris Abbey
  2000-12-21 19:12 ` friedman_hill ernest j
  1 sibling, 0 replies; 10+ messages in thread
From: Chris Abbey @ 2000-12-21 19:04 UTC (permalink / raw)
  To: cygwin

as others have noted java.exe is a dos program, not a cygwin
program (a fact I really hate). Dos programs are not used to
having a shell do globing for them, so they all do it them
selves (nothing like forcing everyone to reinvent the wheel).

as you've noted however double quoting the string prevents it
being globed. That's a dos mentality though, so what you need
the input of the dos program to be is the equivalent of this
char[]: {'"','*','"'}  (actually you'll want a '\0' on the end
too....)

when you run from cmd.exe that's trivial, but you're running
from bash, a REAL POSIX SHELL, which has globing built in.
So you've got to escape out any characters that are part of
the globing formula in cygwin in order to get just the right
stuff passed on to java... both " and * are part of that, so:

java someclass \"\*\"

ugly, ain't it? Makes you wish you had a java.exe that was a
real cygwin executable doesn't it? Do me a favor... call up
your nearest IBM representative and ask for it, or drop a note
into their emailbox over at ibm.com/java and ask for it. (that
goes for anyone who's interested in this btw, just don't tell
'em I sent you. ;)

At 21:36 12/21/00 -0500, Puttkammer, Roman wrote:

>sorry, my example could't have been worse: i just wanted to
>illustrate that the asterix was being expanded (by the shell?)
>even though it's escaped.
>
>the problem is: when invoking
>
>         java someclass \*
>
>the \* is being expanded to the list of files in the current
>directory (the class is invoked with a list of filenames rather
>than with a "*".) AFAIK that shouldn't be.
>
>roman


now the forces of openness
     have a powerful and
     unexpected new ally
    http://ibm.com/linux/


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: bash wildcard expansion
  2000-12-21 18:37 bash wildcard expansion Puttkammer, Roman
  2000-12-21 19:04 ` Chris Abbey
@ 2000-12-21 19:12 ` friedman_hill ernest j
  1 sibling, 0 replies; 10+ messages in thread
From: friedman_hill ernest j @ 2000-12-21 19:12 UTC (permalink / raw)
  To: Puttkammer, Roman; +Cc: 'Dunn-Roberts, Richard', cygwin

The answer is that java.exe, like many Win32 tools, expands
the '*' itself. Remember, COMMAND.COM doesn't expand wildcards, so
individual tools have to do it for themselves. To see this, go to a
MS-DOS prompt window and type '*'. You'll get "Bad command or file
name" -- i.e., no such file *. Now type 'java *'. You'll see a
NoClassDefFound exception naming the alphabetically first file in that
directory. Now try 'java "*"'. Now you'll get a NoClassDefFoundError
for * -- i.e., java.exe itself interpreted the quotes.

Now, given this nice explanation, I -still- can't get quite the effect
you want under bash. I expected java \"\*\" to work, but it seems that
in that case java sees the quotes as part pf the argument, and I'm not
clear why this is different that under the MS-DOS prompt.


I think Puttkammer, Roman wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> 
> sorry, my example could't have been worse: i just wanted to
> illustrate that the asterix was being expanded (by the shell?)
> even though it's escaped.
> 
> the problem is: when invoking
> 
> 	java someclass \*
> 
> the \* is being expanded to the list of files in the current
> directory (the class is invoked with a list of filenames rather
> than with a "*".) AFAIK that shouldn't be.
> 
> roman
> 
> > -----Original Message-----
> > From: Dunn-Roberts, Richard [ mailto:RICHARD.R.DUNN-ROBERTS@saic.com ]
> > Sent: Thursday, December 21, 2000 9:06 PM
> > To: cygwin@cygwin.com
> > Subject: RE: bash wildcard expansion
> > 
> > 
> > It looks to me as if the reason here is that cmlistener.class is being
> > passed to java.  Java does not take the extension.
> > 
> > The correct command is > java cmlistener
> > What is being issued is > java cmlistener.class
> > 
> > Since Java uses the dot as a path separator, it is looking for
> > cmlistener/class.class
> > 
> > As to why it is working in dos, I don't know that answer to that.
> > 
> > I'm curious.  Why do you want to invoke the Java VM with 
> > multiple class
> > files on the command line.  Only the first would get 
> > executed, I think, and
> > the rest would be treated as command line arguments (String 
> > args[]) to the
> > first.
> > 
> > 
> > Richard Dunn-Roberts
> > Science Applications International Corporation
> > 12479 Research Parkway
> > Orlando, Florida, 32826-3248
> > 
> > richard.r.dunn-roberts@saic.com
> > 
> > vox:	(407) 207 2752
> > fax:	(407) 277 5395
> > 
> > 
> > 
> > -----Original Message-----
> > From: Puttkammer, Roman [ mailto:roman.puttkammer@multex.com ]
> > Sent: Thursday, December 21, 2000 8:40 PM
> > To: 'cygwin@cygwin.com'
> > Subject: bash wildcard expansion
> > 
> > 
> > 
> > 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)
> > 
> > -- 
> > To pour bottled sauce over salad is to miss the point of 
> > salad altogether.
> >                                      - Fairways, 
> > advertisement for olive oil
> > 
> > This email message is for the sole use  of the intended 
> > recipient(s) and may
> > contain  confidential and  privileged information.  Any 
> > unauthorized review,
> > use,  disclosure or distribution is prohibited.  If you are 
> > not the intended
> > recipient,  please contact the sender by reply email  and 
> > destroy all copies
> > of the original message.
> > Any views expressed in the email message  are those of the 
> > individual sender
> > except  where  the  sender  specifically states  them  to  be 
> >  the views  of
> > Multex.com, Inc.
> > 
> > Roman Puttkammer                                      
> mailto:putt@multex.com
> Multex.com, Inc.                                       http://www.multex.com
> 33 Maiden Lane                                         tel +1 (212) 859 9908
> New York, NY 10038                                     fax +1 (212) 859 9810
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
> 



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  ejfried@ca.sandia.gov
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: bash wildcard expansion
@ 2000-12-22  5:53 Earnie Boyd
  0 siblings, 0 replies; 10+ messages in thread
From: Earnie Boyd @ 2000-12-22  5:53 UTC (permalink / raw)
  To: cygwin, roman.puttkammer

--- Christopher Faylor <cgf@redhat.com> wrote:
> 
> Actually, on reflection, the "\"*\"" is the problem.  This is not
> the same as "*", of course.  And, that's what you want.
> 
> I can't think of any way to tell cygwin to just quote an argument
> with ", offhand.  I can't even think of a good way to fix this, if
> it is a bug.
> 

And AFAICR it has always been a problem and no one has yet to find "a good way
to fix this."

Cheers,

=====
Earnie Boyd
mailto:earnie_boyd@yahoo.com

---         < http://earniesystems.safeshopper.com >         ---
--- Cygwin: POSIX on Windows < http://gw32.freeyellow.com/ > ---
---   Minimalist GNU for Windows < http://www.mingw.org/ >   ---

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: bash wildcard expansion
  2000-12-21 19:07 ` Christopher Faylor
@ 2000-12-21 19:37   ` Christopher Faylor
  0 siblings, 0 replies; 10+ messages in thread
From: Christopher Faylor @ 2000-12-21 19:37 UTC (permalink / raw)
  To: 'cygwin@cygwin.com', roman.puttkammer

On Thu, Dec 21, 2000 at 10:06:45PM -0500, Christopher Faylor wrote:
>On Thu, Dec 21, 2000 at 09:53:49PM -0500, Puttkammer, Roman wrote:
>>> -----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?
>
>Using '"*"' in bash causes a "*" (i.e., double-quote, asterisk,
>double-quote) to be passed to a program.  I just verified this with an
>"echoargs" program compiled with both mingw and MSVC.  When I use a
>'"*"' on the command line the mingw or msvc application sees a "*" as
>its argv[0].
>
>Or, more specifically, what the programs sees is:
>
>c:\tmp\echoargs.exe "\"*\""

Actually, on reflection, the "\"*\"" is the problem.  This is not
the same as "*", of course.  And, that's what you want.

I can't think of any way to tell cygwin to just quote an argument
with ", offhand.  I can't even think of a good way to fix this, if
it is a bug.

cgf

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: bash wildcard expansion
  2000-12-21 18:54 Puttkammer, Roman
@ 2000-12-21 19:07 ` Christopher Faylor
  2000-12-21 19:37   ` Christopher Faylor
  0 siblings, 1 reply; 10+ messages in thread
From: Christopher Faylor @ 2000-12-21 19:07 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'; +Cc: roman.puttkammer

On Thu, Dec 21, 2000 at 09:53:49PM -0500, Puttkammer, Roman wrote:
>> -----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?

Using '"*"' in bash causes a "*" (i.e., double-quote, asterisk,
double-quote) to be passed to a program.  I just verified this with an
"echoargs" program compiled with both mingw and MSVC.  When I use a
'"*"' on the command line the mingw or msvc application sees a "*" as
its argv[0].

Or, more specifically, what the programs sees is:

c:\tmp\echoargs.exe "\"*\""

It looks like java is somehow confused by this.  I really don't
understand why it should but it still looks like a problem with the java
program to me.

cgf

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: bash wildcard expansion
@ 2000-12-21 18:54 Puttkammer, Roman
  2000-12-21 19:07 ` Christopher Faylor
  0 siblings, 1 reply; 10+ messages in thread
From: Puttkammer, Roman @ 2000-12-21 18:54 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'; +Cc: Puttkammer, Roman

> -----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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: bash wildcard expansion
  2000-12-21 17:40 Puttkammer, Roman
@ 2000-12-21 18:31 ` Christopher Faylor
  0 siblings, 0 replies; 10+ messages in thread
From: Christopher Faylor @ 2000-12-21 18:31 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'; +Cc: roman.puttkammer

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: bash wildcard expansion
@ 2000-12-21 18:06 Dunn-Roberts, Richard
  0 siblings, 0 replies; 10+ messages in thread
From: Dunn-Roberts, Richard @ 2000-12-21 18:06 UTC (permalink / raw)
  To: cygwin

It looks to me as if the reason here is that cmlistener.class is being
passed to java.  Java does not take the extension.

The correct command is > java cmlistener
What is being issued is > java cmlistener.class

Since Java uses the dot as a path separator, it is looking for
cmlistener/class.class

As to why it is working in dos, I don't know that answer to that.

I'm curious.  Why do you want to invoke the Java VM with multiple class
files on the command line.  Only the first would get executed, I think, and
the rest would be treated as command line arguments (String args[]) to the
first.


Richard Dunn-Roberts
Science Applications International Corporation
12479 Research Parkway
Orlando, Florida, 32826-3248

richard.r.dunn-roberts@saic.com

vox:	(407) 207 2752
fax:	(407) 277 5395



-----Original Message-----
From: Puttkammer, Roman [ mailto:roman.puttkammer@multex.com ]
Sent: Thursday, December 21, 2000 8:40 PM
To: 'cygwin@cygwin.com'
Subject: bash wildcard expansion



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)

-- 
To pour bottled sauce over salad is to miss the point of salad altogether.
                                     - Fairways, advertisement for olive oil

This email message is for the sole use  of the intended recipient(s) and may
contain  confidential and  privileged information.  Any unauthorized review,
use,  disclosure or distribution is prohibited.  If you are not the intended
recipient,  please contact the sender by reply email  and destroy all copies
of the original message.
Any views expressed in the email message  are those of the individual sender
except  where  the  sender  specifically states  them  to  be  the views  of
Multex.com, Inc.

Roman Puttkammer                                      mailto:putt@multex.com
Multex.com, Inc.                                       http://www.multex.com
33 Maiden Lane                                         tel +1 (212) 859 9908
New York, NY 10038                                     fax +1 (212) 859 9810

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

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* bash wildcard expansion
@ 2000-12-21 17:40 Puttkammer, Roman
  2000-12-21 18:31 ` Christopher Faylor
  0 siblings, 1 reply; 10+ messages in thread
From: Puttkammer, Roman @ 2000-12-21 17:40 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

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)

-- 
To pour bottled sauce over salad is to miss the point of salad altogether.
                                     - Fairways, advertisement for olive oil

This email message is for the sole use  of the intended recipient(s) and may
contain  confidential and  privileged information.  Any unauthorized review,
use,  disclosure or distribution is prohibited.  If you are not the intended
recipient,  please contact the sender by reply email  and destroy all copies
of the original message.
Any views expressed in the email message  are those of the individual sender
except  where  the  sender  specifically states  them  to  be  the views  of
Multex.com, Inc.

Roman Puttkammer                                      mailto:putt@multex.com
Multex.com, Inc.                                       http://www.multex.com
33 Maiden Lane                                         tel +1 (212) 859 9908
New York, NY 10038                                     fax +1 (212) 859 9810

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2000-12-22  5:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-21 18:37 bash wildcard expansion Puttkammer, Roman
2000-12-21 19:04 ` Chris Abbey
2000-12-21 19:12 ` friedman_hill ernest j
  -- strict thread matches above, loose matches on Subject: below --
2000-12-22  5:53 Earnie Boyd
2000-12-21 18:54 Puttkammer, Roman
2000-12-21 19:07 ` Christopher Faylor
2000-12-21 19:37   ` Christopher Faylor
2000-12-21 18:06 Dunn-Roberts, Richard
2000-12-21 17:40 Puttkammer, Roman
2000-12-21 18:31 ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).