3 ms·
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 o
by wrs 3y 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!
- flakes 3y agoWait, 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.
- wrs 3y agoI found a random example on GitHub for you. Search `path:jq$` for more. https://github.com/flox/flox/blob/019095f8bc40e49abc8e5cd0b1094e4c89a74f38/flox-bash/lib/diff-catalogs.jq#L1 https://github.com/flox/flox/blob/019095f8bc40e49abc8e5cd0b1...