Re:Blocklist Facebook domains
by zackmorris on Wednesday March 21, 2018 @01:14PM
(#16640218)
Thank you, I didn't know about the `cat -` trick to read from stdin (works the same as `echo hi | cat /dev/stdin`). Even after all this time, I still learn something new every day.
[ Parent
| on HN ]
echo hi | cat -
is also equivalent to echo hi | cat
You only need the - if you are concatenating other files with stdin [1]. Incidentally, any use of echo x | y
can be replaced (at least in Bash) with y <<< "x"
This is called a "here string" [2].[1] https://www.freebsd.org/cgi/man.cgi?query=cat&manpath=FreeBS...