Plurrrr

Fri 19 Apr 2019

How to use jq in a shell pipeline

If you use the identity filter, '.', you can pipe output of a command to jq, a lightweight and flexible command-line JSON processor, and have it pretty printed. For example:

curl -s ip-api.com/json/ | jq '.'

The above will show information about your current (external) IP address, similar to http://ipinfo.io/.

For more information about jq, see the jq Manual.