Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


There’s this. Though it would look nicer with another |.

  <f a | b | c


That’s actually not half-bad. I think I’ll use that, thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: