PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs323] Command line question
Date: Thursday, 10 Sep 2020, 13:21:22


    > Message Posted By: Unknown
    >
    > Isn't -newer and -name checked during the first traversal of the command
    > line? For example if no name exists after -name then it will exit and you
    > stat(file) the file after -newer fails, then it will exit if the file path
    > doesn't exist.

No, as stated in the revised specification issued on
Sunday morning (09/06):

  B. fiend must:
     * Detect errors in command-line arguments (other than a FILENAME that does|
       not exist) before the first traversal begins.                           |
   
(note the change bars in the right-hand margin).

A similar example is

  % ./fiend . -print -depth

If the EXPRESSION is not "parsed" BEFORE the first
traversal, the filename . will be printed before fiend
notices that the traversal should be postorder, not
preorder.

--Stan-
PREV INDEX NEXT