3 ms·
Preach. This happens to me all the time and keeps happening. There's a lot of Unix/Linux stuff that I wish I could UNlearn, I'm aware of other tools but muscle
by jrm4 3y ago
Preach. This happens to me all the time and keeps happening.
There's a lot of Unix/Linux stuff that I wish I could UNlearn, I'm aware of other tools but muscle memory keeps me using worse things.
(honestly, I also feel this way about vim as well as 'writing in cursive')
- entropie 3y agoI feel you. I still `cat foo | grep bar` instead of `grep foo bar`
- nielsole 3y agoThe reason I stick to `cat foo | grep bar` is that I am never quite sure if `grep bar foo` would be correct instead (it is).
- jrm4 3y agoBut to me -- this is different? I believe "useless use of cat" is FAR MORE useful than what the ultra-nerds say; I could care less about "saving a few characters." The mental model of the pipeline --in one end and out the other -- is entirely too usefully intuitive and way better than some imaginary geek-cred. (I was more thinking about the new rust tools, e.g. rg instead of grep)
- systems_glitch 3y agoPlus sometimes you want to throw something like `pv` in.
- simon04 3y agoPlus the regex is more likely incorrect in the first attempt and needs to be fixed.
- _V_ 3y agoThe former has one big advantage: I can easily change "needle" without having to skip all over the cmdline... Pretty usefull when debugging something interactively.
- MathMonkeyMan 3y agoMight help to replace cat foo | $command with <foo $command It's the same order, but I think $command can sniff what kind of file stdin is, and optimize.
- ezequiel-garzon 3y agoActually instead of `grep bar foo`.