3 ms·
I wrote a small tool that translates AdBlock Plus filter lists into hosts file format [1]. It can only translate simple domain-name rules but might be of intere
by stirner 9y ago
I wrote a small tool that translates AdBlock Plus filter lists into hosts file format [1]. It can only translate simple domain-name rules but might be of interest to people in this thread.
[1] https://github.com/wwalexander/hostsblock https://github.com/wwalexander/hostsblock
- zackmorris 9y agoThank 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.
- stirner 9y agoecho 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=FreeBSD+9.1-RELEASE https://www.freebsd.org/cgi/man.cgi?query=cat&manpath=FreeBS... [2] http://tldp.org/LDP/abs/html/x17837.html http://tldp.org/LDP/abs/html/x17837.html