3 ms·
I agree that it's more elegant, but it requires you to remember the operator precendence of < vs |
by n_plus_1_acc 3y ago
I agree that it's more elegant, but it requires you to remember the operator precendence of < vs |
- kristjansson 3y agoIt's not really a precedence relation as much as it's part of shell syntax. There are separators[0], and anything sequence of tokens between a separator is a command[1]. A command decomposes further, of course, but the only thing the programmer needs to know here is that separators are a different kind of thing than commands. [0]: newline, ‘||’, ‘&&’, ‘&’, ‘;’, ‘;;’, ‘;&’, ‘;;&’, ‘|’, ‘|&’, ‘(’, or ‘)’. [1]: https://www.gnu.org/software/bash/manual/bash.html#Simple-Commands https://www.gnu.org/software/bash/manual/bash.html#Simple-Co...