Skip to content

Instantly share code, notes, and snippets.

@DerfOh
Created December 14, 2016 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DerfOh/3eaba48efcd54834ba0eb667ab23a3cb to your computer and use it in GitHub Desktop.
Save DerfOh/3eaba48efcd54834ba0eb667ab23a3cb to your computer and use it in GitHub Desktop.
simple example of using awk to parse a json output
echo "$status" | awk -F"[,:]" '{for(i=1;i<=NF;i++){if($i~/completed\042/){print $(i+1)} } }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment