grep = * vs grep = * > foo

Christopher Faylor cgf@redhat.com
Tue Oct 8 20:39:00 GMT 2002


On Tue, Oct 08, 2002 at 05:41:18PM -0700, Sheryl McKeown wrote:
>That makes sense in the Unix world, but in this particular XP directory
>*.* returns the same listing as *
>
>As you note though, 
>grep = * > delme and
>grep = *.* > delme.txt
>both create an infinite loop.
>
>But, "grep = *.* > delme." does not create the loop.

Gareth is correct.

If you do this:

  touch delme
  ls *.*

You'll see that delme is not listed.  Cygnus wildcard expansion follows
UNIX rules, not MS-DOS rules.  You can't (easily) create an actual
'delme.' file on Windows.  So, "delme." is the same thing as "delme", i.e.
if you perform an ls on the directory, you'll see a file called "delme"
not "delme.".

cgf

>--- Gareth Pearce <tilps@hotmail.com> wrote:
>> 
>> >Thanks, cgf, That makes sense.
>> >
>> >But one more comment
>> >
>> >"grep = *.* > delme" from the XP prompt does NOT
>> >create the infinite loop.  It acts like the bash
>> >shell.
>> 
>> well obviously - delme doesnt contain a period.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list