Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
kazinator
· 2y ago · 0 comments
Bash allows the $(< file) syntax instead of $(cat file), and I think the latter might be converted to the former.
Comments
[–]
neuromanser
2y ago
It's built-in in Zsh: The substitution ‘$(cat foo)’ may be replaced by the faster ‘$(<foo)’.
https://zsh.sourceforge.io/Doc/Release/Expansion.html#Comman...
[–]
ufo
2y ago
Is that only for command substitution?
[–]
neuromanser
2y ago
What do you mean? It's specifically for $(cat …) / $(< …): the latter is a faster equivalent of the former. Other than that, see my comment about $READNULLCMD.