Re:Ask HN: Have you created programs for only your personal ...
by jmholla on Wednesday April 13, 2022 @09:20PM
(#31022362)
I use cat like this all the time. It means I can easily change whatever program I'm using to interact with the program (e.g. switching `tr` to `sed`).
[ Parent
| on HN ]
Re:Ask HN: Have you created programs for only your personal ...
by yakubin on Thursday April 14, 2022 @08:56AM
(#31026327)
You can replace "cat /usr/share/dict |" in that invokation with "</usr/share/dict" and it will be equally easy to switch between tr and sed. Yes, you can put that redirection at the start, not just at the end of a command line. Although I admit I still haven't got used to doing it.