Author: Stan Eisenstat
Subject: Re: [Cs323] -name wildcard
Date: Thursday, 17 Sep 2020, 10:54:32
> Message Posted By: Unknown
>
> In one of your posts about wildcard characters, you mentioned:
> =====
> And for
>
> % ./fiend . -name X*
>
> it replaces X* by a list of all such files whose names
> begin with X. But if there are no such files, then the
> command is equivalent to
>
> % ./fiend . -name
>
> which should result in an error message.
> =====
As I later posted, under bash the second command would
have been equivalent to
% ./fiend . -name 'X*'
so that X* is passed to fiend as an argument.
=====
> However, when I run /c/cs323/Hwk1/fiend . -name X* in a directory with no
> files beginning with X, it simply has no output. Is this the correct
> behavior, or should there be a "missing argument to name" type of error?
Yes. Since there is an argument following -newer, there
should not be an error message about a missing argument,
and since there is no file whose name begins with X, there
is no match during the traversal.
--Stan-
PREV
INDEX
NEXT