[TUHS] redirection wildness in v7
will.senn at gmail.com
Fri Nov 10 01:38:03 AEST 2017
This is a good answer. I thought it was great until I saw Dan's :).
I didn't realize that the open group standard was online and accessible.
Thanks for the link.
On 11/09/2017 09:04 AM, Ralph Corderoy wrote:
> Hi Will,
>> Why does the first of these incantations not present text, but the
>> second does (word is a file)? Neither errors out.
>> $ <word | sed 20q
>> $ <word sed 20q
> That's still the case with modern-day sh(1).
> explains that a simple command doesn't need to result in a command name
> to execute. In your first pipeline, there's nothing to copy the data
> from the first subshell's stdin redirected from ./word to the subshell's
> stdout that's pipes into sed's stdin. Adding a command to do the copy
> <word cat | sed 20q
More information about the TUHS