Skip to content

Instantly share code, notes, and snippets.

@DerfOh
Created December 14, 2016 19:41
Show Gist options
  • 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