Wiki > jq
jq is like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text.
Installation
-
Connect to your slot through SSH
-
mkdir ~/bin -
Download the binary
wget -P ~/bin https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -
Make it executable
chmod +x ~/bin/jq-linux64 -
Add an alias so you can call it using
jqrunalias jq=jq-linux64 -
(Optional) Add ~/bin to your PATH so that you can run binaries in ~/bin without specifying the path. Ignore this step if you have performed it for a different program.
echo "PATH=\$HOME/bin:\$PATH" >> ~/.bashrc && source ~/.bashrc
You can now run ~/bin/jq (or jq if the optional step is completed) to use the program.