PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs323] Wildcard Follow Up
Date: Sunday, 13 Sep 2020, 09:53:15


    > Message Posted By: Unknown
    >
    > when I do:
    >
    > % ./fiend . -name X*, I get no output
    >
    > When I do
    >
    > % /c/cs323/Hwk1/fiend * -name X*, I also get no output.
    >
    > For both, I have no file beginning with X*. As per your last response on
    > wildcards, is this expected? You stated that both should print out an error.

bash expands all wildcards on the command line, unless
they are escaped.  If none of the wildcard expressions
expands to one or more files, then bash issues an error
message.  For example, if there is no file whose name
begins with X in the current working directory (CWD),
then

  % echo X*
  echo: No match.

(the error message is from bash), but

  % echo fi*nd X*
  fiend
   
(the output is from echo).  Similarly, the first command
above

  % ./fiend . -name X*

should result in an error message from bash; while the
second

  % /c/cs323/Hwk1/fiend * -name X*

should expand to

  % /c/cs323/Hwk1/fiend list-of-files-in-CWD -name

which should result in an error message from Hwk1/fiend.

If you are not seeing these outputs, please contact me
directly.

--Stan-
PREV INDEX NEXT