PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs323] Two output redirects
Date: Sunday, 27 Sep 2020, 19:08:15


    > Message Posted By: Unknown
    >
    > Why does running staff solution with command ">>a bcd | c;" lead to the
    > error "parsley:  two output redirects"?  Based on the grammar rules, I
    > thought the expected output would be:
    >
    > CMD (Depth = 2):  SIMPLE,  argv[0] = bcd  >>a
    > CMD (Depth = 1):  PIPE
    > CMD (Depth = 2):  SIMPLE,  argv[0] = c
    > CMD (Depth = 0):  SEP_END

While the grammar allows multiple redirects of the
standard output, Note 5 of the specification states:

  parsley should detect errors such as:
  ...
  * multiple input, output, or error redirection; e.g.,
      ls >bar | wc

Thus while the command is syntactically correct, it is
semantically invalid.

--Stan-
PREV INDEX NEXT