https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...
In bash/ksh, it matches frou_dh's explanation. In zsh, it depends on how you've set the various *NULLCMD options and parameters. In csh, it is an error.
Even in zsh, when configured to behave like `cat file` it still doesn't quite do that as it won't concatenate files as it only passes the first shell word following the `<` to `cat`(or whatever you've set NULLCMD to). Guess that means you could be evil by making a wrapper that allows weird Unicode separators to pass multiple files in one word to get the concatenation back ;)
This means I get to remember an increasingly unfortunate amount of differences. I’ll add this one to the pile, thanks.
I definitely get the argument about shellcheck though, it would be nice if it supported zsh.
It definitely looks foreign, but then, so does parameter substitution in bash or zsh. There are shell scripts, and then there are those that make you break out the man pages to figure out what they’re doing.
1) Muscle memory
2) Often when I don't I end up needing two files later
3) It annoys merlyn (Randal Schwartz)
command > file
https://www.gnu.org/software/bash/manual/html_node/Redirecti...