delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/23/05:59:36

Date: Thu, 23 May 1996 12:53:23 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Nick Plant <njp AT tesa DOT demon DOT co DOT uk>
Cc: djgpp AT delorie DOT com
Subject: Re: Something funny in startup code?
In-Reply-To: <832809029snx@tesa.demon.co.uk>
Message-Id: <Pine.SUN.3.91.960523124613.3895B-100000@is>
Mime-Version: 1.0

On Wed, 22 May 1996, Nick Plant wrote:

> When I type:
> 
>   grep SomeText \proj\p309\...\file1
> 
> I get the the following error:
> 
>   grep: \proj\p309\startup.dat: No such file or directory (ENOENT)
> 
> The \proj\p309 directory does not contain file1. I think the error is coming
> from the startup code. It seems to produce an error for every directory that
> does not have any matching files.

You should see such a message for every wildcard that doesn't match any
file at all (so if there is "file1" anywhere below "proj/p309", you should
NOT see this message, unlike what you seem to say).  If that is what you
see, then this is the expected behavior.  The DJGPP startup code expands
the wildcards in the command-line arguments; if no file at all matched a
wildcard, it is passed unchanged to grep.  When grep sees a filename like
"proj/p309/.../file1" it tries to open it for reading and of course fails
with ENOENT.

If you do such things on Unix, the shell will tell ``No match'', which is 
also a kind of error message.  DJGPP just behaves in a similar way.

- Raw text -


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