delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/01/04/19:19:42

From: marc AT watson DOT ibm DOT com (Marc Auslander)
Subject: Re: B20.1 bug: find is acting funny
4 Jan 1999 19:19:42 -0800 :
Message-ID: <9901041515.AA81658.cygnus.gnu-win32@marc.watson.ibm.com>
References: <000001be3792$9adb78a0$0c0aa8c0 AT harry DOT scoutsys DOT com>
Reply-To: marc AT watson DOT ibm DOT com
To: hughw AT scoutsys DOT com
Cc: gnu-win32 AT cygnus DOT com

>
>In b20.1 (bash 2.02.1(2), find 4.1) if I do
>    find ./ -name *.java
>
>and there are some .java files in the current directory, find emits
>
>	find: paths must precede expression
>	Usage: find [path...] [expression]
>
>but if there are no .java files in the current directory, find behaves as
>expected.
>
>Same behavior for any search pattern, not just .java, of course.
>
>find was working properly in 20.0 I'm pretty sure.
>
>
>Hugh Winkler
>Scout Systems, Inc.
>

this is normal behavior is globing is on, which is the shell default.
It has nothing to to with find.  The shell is expanding *.java into a
list of files.  If there are none, it leave *.java as is.  You want to
type:

        find . -name '*.java'

to supress globing.  (And you can leave out the "/" as I did in the example).



Marc Auslander   <marc AT watson DOT ibm DOT com>   914 945-4346  (Tieline 862 Fax x4425)
-
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