Skip to content

Instantly share code, notes, and snippets.

@kamermans
Created January 22, 2015 17:21
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save kamermans/c860ae5f3e2cdd49f4a3 to your computer and use it in GitHub Desktop.
Save kamermans/c860ae5f3e2cdd49f4a3 to your computer and use it in GitHub Desktop.
Install jq (JSON Command Line processor)
#!/bin/bash -e
# This scripts installs jq: http://stedolan.github.io/jq/
JQ=/usr/bin/jq
curl https://stedolan.github.io/jq/download/linux64/jq > $JQ && chmod +x $JQ
ls -la $JQ
@darookee
Copy link

One could also use curl -sLo $JQ https://stedolan.github.io/jq/download/linux64/jq instead of > $JQ.

@justinTM
Copy link

justinTM commented Mar 2, 2022

@darookee i get permission error running that. works with the original

@darookee
Copy link

darookee commented Mar 2, 2022

@justinTM yes, you still need the chmod +x-part, but curl can already 'output to file' by itself, so there is no need to redirect the stdout to the file.

@justinTM
Copy link

justinTM commented Mar 2, 2022

@darookee gotcha I missed that thank you for your replies!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment