Author: Stan Eisenstat
Subject: Followup on here doc
Date: Sunday, 27 Sep 2020, 20:24:19
Earlier tonight I posted a response to a question about a [stage] containing two redirections of stdin to a HERE document. I discussed two ways in which the documents could be handled: * when the redirection is seen (i.e., before the error is detected so that the lines must be read) * when the CMD node for the [stage] is complete (i.e., after the error would be detected so that the lines need not be read). I noted that Hwk2/parsley uses the first (the second requires the same number of lines of code), but that bash does not encounter this problem since it allows multiple redirections of stdin. Here is an example that shows that bash uses the first scheme above, at least in part: $ cat << a | | cat bash: syntax error near unexpected token `|' > aa > a --Stan-PREV INDEX NEXT