Hacker News new | ask | show | jobs
by wrs 1024 days ago
Also, here’s something that seems not widely appreciated: You can write super clever unreadable one-long-line jq programs embedded in bash scripts (I hear you on the point-free thing), or you can write jq programs that live in their own files, with multiple lines, indentation, comments, and intermediate assignments to variables with readable names. I recommend the latter!
1 comments

Wait, really? I had no idea you could do that. Might have to try that next time Im tempted to break out python or node for a bash script.
I found a random example on GitHub for you. Search `path:jq$` for more.

https://github.com/flox/flox/blob/019095f8bc40e49abc8e5cd0b1...