Created
December 14, 2016 19:41
-
-
Save DerfOh/3eaba48efcd54834ba0eb667ab23a3cb to your computer and use it in GitHub Desktop.
simple example of using awk to parse a json output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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