Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Thu, 21 Dec 2000 21:30:54 -0500 From: Christopher Faylor To: "'cygwin AT cygwin DOT com'" Cc: roman DOT puttkammer AT multex DOT com Subject: Re: bash wildcard expansion Message-ID: <20001221213054.C6206@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: "'cygwin AT cygwin DOT com'" , roman DOT puttkammer AT multex DOT com References: <2CB1272B2212D211974D00805FCB57420AFAFBE5 AT 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