4 ms·
Why does `red` never show?
by anamexis 8y ago
Why does `red` never show?
- lnyng 8y ago1) If RHS exits before `echo red` is executed, `echo red` receives a SIGPIPE and crashes 2) Even if RHS does not exit quick enough, `echo red` writes output to the pipe, which is ignored by RHS `echo blue` (echo never reads stdin)
- xorcist 8y agoWhy would you expect it to show? Would you also expect "echo something < file.txt" to show the contents of file.txt? Perhaps you are thinking of cat or some other command, because piping things to echo is such a strange and unexpected thing to do that you normally won't encounter it.
- anamexis 8y agoBecause the other output of the LHS (sometimes) shows.