4 ms·
It's not that it feels awkward to write the redirection first. It's that it feels awkward to write `< file cmd`, with no operator between the filename and the c
by JoshTriplett 2y ago
It's not that it feels awkward to write the redirection first. It's that it feels awkward to write `< file cmd`, with no operator between the filename and the command, and the redirection operator not pointing at the command.
- jchw 2y agoTo me, the < and > redirections never point toward or away from the command. Rather, they point into or out of the file. And really that's because they do: like, >file is really 1>file, and <file is really 0<file. I think if your intuition on how redirections work is based on whether it points at the command it's worth rethinking how you look at redirections.