News for hackers. Stuff that matters.
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.
Re:Tips for analyzing logs by aendruk on Tuesday December 13, 2022 @05:12PM (#33976757)
There’s this. Though it would look nicer with another |.

  <f a | b | c
Re:Tips for analyzing logs by amarshall on Tuesday December 13, 2022 @05:13PM (#33976775)
That’s actually not half-bad. I think I’ll use that, thanks!