Re:Tips for analyzing logs
by amarshall on Tuesday December 13, 2022 @05:04PM
(#33976632)
I do “useless” use of cat quite often because, in my brain, the pipeline naturally starts with “given this file”, so it makes the pipeline more consistent e.g. `cat f | a | b | c` rather than `a < f | b | c` where one must start with the first “function” rather than with the data. I see starting with `cat` analogous to the `->` thread macro in Clojure, `|>` pipe in Elixir, and `&` reverse application operator in Haskell. If bash permitted putting the filename first, I’d stop using `cat`; alas, it does not.
[ Parent
| on HN ]
There’s this. Though it would look nicer with another |.
<f a | b | c