←back to thread

2039 points Gadiguibou | 5 comments | | HN request time: 0s | source
Show context
klausa ◴[] No.36491947[source]
`pbcopy` and `pbpaste` are one of my most-loved in the list.

Dealing with some minified json, switching to iTerm, doing `pbpaste | json_pp | pbcopy` and having a clean output is _so_ nice.

replies(28): >>36492008 #>>36492015 #>>36492028 #>>36492101 #>>36492108 #>>36492229 #>>36492265 #>>36492890 #>>36492953 #>>36493037 #>>36493127 #>>36493336 #>>36493457 #>>36493802 #>>36494023 #>>36494242 #>>36494325 #>>36495379 #>>36495894 #>>36496866 #>>36497033 #>>36497293 #>>36497589 #>>36497973 #>>36498181 #>>36498558 #>>36498586 #>>36535798 #
omginternets ◴[] No.36492265[source]
If I had a nickel for each `cat foo.json | jq | pbcopy`, I'd be a rich man :)
replies(1): >>36492862 #
maleldil ◴[] No.36492862[source]
That's a useless use of cat. You can use `jq . foo.json | pbcopy` or `jq < foo.json | pbcopy`.
replies(6): >>36492960 #>>36493144 #>>36493370 #>>36494558 #>>36495101 #>>36495918 #
1. nojs ◴[] No.36494558{3}[source]
The “useless cat” meme needs to die. Everyone is aware that most commands accept a file argument, but looking up the arguments and their ordering is annoying and using cat for things like this is just fine.
replies(4): >>36494590 #>>36494899 #>>36496086 #>>36496387 #
2. omginternets ◴[] No.36494590[source]
This. "Useless cat" is more useful than "useless file-arg".
3. epcoa ◴[] No.36494899[source]
The redirect always works though - that is not a program argument, that is handled by the shell. Apparently not everyone is aware of that.
4. hdb2 ◴[] No.36496086[source]
granted, it is a little snarky and maybe the snark isn't appropriate in today's tech environment. but no, things like "useless use of cat" do not need to go away, because they make me better at what I do in little ways. those little ways add up over time.

> but looking up the arguments and their ordering is annoying

you seem to be arguing for complacency. taking your idea to an extreme, why learn to do _anything_ well?

5. burnished ◴[] No.36496387[source]
Everyone is not aware, new people are joining all the time.