Created
September 23, 2020 09:20
-
-
Save kaihendry/57daa9980d7ec8ee9c9c28cca0b9457a to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
cat << EOF | | |
[{ | |
"name": "A water bottle", | |
"sku": "wrt1" | |
},{ | |
"name": "Water bottles", | |
"sku": "wrt6" | |
} | |
] | |
EOF | |
jq -r '.[]|.name,.sku' | | |
while read -r name | |
read -r sku; do | |
printf "Name: %s SKU: %s\n" "$name" "$sku" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment