jc: JSONify the output of dozens of common GNU/linux commands and file types

reddit

Hi everyone – I've just released version 1.7.1 of jc.

https://blog.kellybrazil.com/2020/02/06/jc-version-1-7-1-released/

jc converts the output of dozens of common gnu/linux commands and file types to JSON so you can use tools like jq to filter instead of lower-level text processing tools like sed or awk.

https://github.com/kellyjonbrazil/jc

For example:

$ ls -l /usr/bin | jc --ls | jq '.[] | select(.size > 50000000)' {"filename": "docker", "flags": "-rwxr-xr-x", "links": 1, "owner": "root", "group": "root", "size": 68677120, "date": "Aug 14 19:41"} 

Here is a blog post on the motivations for this project:

https://blog.kellybrazil.com/2019/11/26/bringing-the-unix-philosophy-to-the-21st-century/

And here is a fun use-case using jc, jq, and jp to plot system stats on the terminal:

https://blog.kellybrazil.com/2020/01/15/silly-terminal-plotting-with-jc-jq-and-jp/

Happy JSON parsing!

submitted by /u/kellyjonbrazil
[link] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *