Timeline for How to sort a stream of json objects by field value using jq
Current License: CC BY-SA 4.0
16 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 22, 2024 at 16:48 | comment | added | scubbo | cat file | map | filter is only three characters more than <file map | filter, and it avoids the awkward implication that data is flowing "in the opposite direction to" the arrow. Perfectly reasonable to me. Performance-purists might rightly identify that there is overhead of another process, but this formulation is intended for experimentation (while writing and developing a utility-pipeline or exploring a dataset), not for high-performance production use. | |
| Jan 20, 2024 at 17:48 | comment | added | Jim | @scubbo completely disagree with you. It's not an anti-pattern. It's far better to use system tools correctly and using STDIN is NOT intuitive in my subjective opinion. Objectively, there is absolutely no reason to use cat and @geedoubleya is absolutely correct. TBH, I don't even understand what @synthesizerpatel is trying to articulate in order to justify using it. But hey, if someone wants to type useless stuff and waste time doing it, I guess that's their prerogative. Let's stay away from cheering on poor practice please. | |
| Oct 24, 2023 at 19:15 | comment | added | scubbo | > Do people not call out 'Useless Use of Cat' anymore? I would be happy to hear that this meme has died! It's an anti-pattern - as @synthesizerpatel points out, when iterating and experimenting in the shell, it's both neater and more intuitive to start the pipeline-of-commands with cat file.txt | |
| Jun 28, 2023 at 23:24 | comment | added | synthesizerpatel | @geedoubleya I often cat the output of curl calls that I've saved to disc to jq and when I'm working on the jq string, I want the last argument to be my quoted jq script. Otherwise I have to keep re-typing or moving over the filename in the shell. Yuck. | |
| Mar 7, 2023 at 18:21 | comment | added | geedoubleya | Do people not call out 'Useless Use of Cat' anymore? jq [options...] filter [files...] | |
| Feb 8, 2021 at 1:10 | history | edited | alec | CC BY-SA 4.0 | edited body |
| Oct 10, 2020 at 2:06 | history | edited | alec | CC BY-SA 4.0 | make this much easier to read, in case anyone comes this way |
| S Oct 10, 2020 at 1:54 | history | suggested | thanasisp | CC BY-SA 4.0 | title and tags |
| Oct 10, 2020 at 1:50 | review | Suggested edits | |||
| S Oct 10, 2020 at 1:54 | |||||
| Oct 10, 2020 at 1:35 | vote | accept | alec | ||
| Oct 10, 2020 at 1:20 | history | edited | alec | CC BY-SA 4.0 | added 1415 characters in body |
| Oct 9, 2020 at 23:00 | answer | added | thanasisp | timeline score: 73 | |
| Oct 9, 2020 at 22:56 | history | edited | alec | CC BY-SA 4.0 | deleted 16 characters in body |
| Oct 9, 2020 at 22:48 | history | edited | alec | CC BY-SA 4.0 | added 240 characters in body |
| Oct 9, 2020 at 22:18 | history | edited | alec | CC BY-SA 4.0 | deleted 2 characters in body |
| Oct 9, 2020 at 22:13 | history | asked | alec | CC BY-SA 4.0 |