Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Thu, 21 Dec 2000 21:30:54 -0500
From: Christopher Faylor <cgf@redhat.com>
To: "'cygwin@cygwin.com'" <cygwin@cygwin.com>
Cc: roman.puttkammer@multex.com
Subject: Re: bash wildcard expansion
Message-ID: <20001221213054.C6206@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: "'cygwin@cygwin.com'" <cygwin@cygwin.com>,
	roman.puttkammer@multex.com
References: <2CB1272B2212D211974D00805FCB57420AFAFBE5@MSEXCHANGE>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.11i
In-Reply-To: <2CB1272B2212D211974D00805FCB57420AFAFBE5@MSEXCHANGE>; from roman.puttkammer@multex.com on Thu, Dec 21, 2000 at 08:40:02PM -0500

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

