PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs323] Bump: wildcard char in filenames
Date: Saturday, 12 Sep 2020, 19:20:20


    > Message Posted By: Unknown
    >
    > Just wondering if there's any update about my question here:
    >
    > Is fiend supposed to be able to deal with wildcard ('*') characters in
    > filenames? The solution script works with some cases, such as ./fiend * or
    > ./fiend ../*/*/*.c, but raises a stat error if there are no files that
    > follow filename regex. If we are supposed to deal with wildcards, is there
    > a convenient way of processing them, especially if the filename uses many
    > of them such as ./fiend ../*/src/*log/*.c?

Sorry, I wrote this response on Friday morning but
forgot to post it:

  As stated in a previous post and noted in Hwk1/f20h1.c1;
   
    fiend may ignore wildcard characters that appear in filenames.
   
  However, you should be aware that bash expands wildcards
  on the command line before passing the arguments to fiend.
  Thus for
   
    % ./fiend *
   
  bash expands * to a list of all files in the current
  working directory and passes all of their names to
  fiend.  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.
   
--Stan-
PREV INDEX NEXT