delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/08/11/20:47:43

From: dbe AT wgn DOT net ("$Bill Luebkert")
Subject: Re: filename expansion
11 Aug 1997 20:47:43 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <33EFD432.380D.cygnus.gnu-win32@wgn.net>
References: <311E5922 DOT 9F864639 AT ci DOT uminho DOT pt>
Reply-To: dbe AT wgn DOT net
Mime-Version: 1.0
X-Mailer: Mozilla 3.02Gold (Win95; U)
Original-To: "Daniel P.C. da Silva" <si10647 AT ci DOT uminho DOT pt>
Original-CC: gnu-win32 mailing list <gnu-win32 AT cygnus DOT com>
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Daniel P.C. da Silva wrote:
> 
> I don't know how to pass a pattern (like find . -name "*.pl") without
> doing filename expansion. Under UNIX, I would use \* , "*" or '*' to
> protect the pattern from the shell. None of this methods work with
> gnu-win32 commands running from a command prompt (not bash).
> Is there another way of doing this?

There is a bug (IMHO) in the argument passing of non-cygwin shells.
Cygwin assumes that the shell has no globbing ability and globs 
the cmdline.  Furthermore, it ignores ' and ", so you can't escape 
it.  I think I may have found a kludge around it though.

Try:
  xargs find . -name
  *.pl -print
  ^Z
or
  xargs find . -name
  *.pl
  -print
  ^Z

-- 
  ,-/-  __      _  _         $Bill Luebkert
 (_/   /  )    // //       DBE Collectibles
  / ) /--<  o // //      http://www.wgn.net/~dbe/
-/-' /___/_<_</_</_    Email: dbe AT wgn DOT net
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019