Advertisement
pilasguru

Json to Bash variables

Apr 21st, 2022
997
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.09 KB | None | 0 0
  1. echo '{ "foo": 123, "bar": 456 }' |  jq -r '. | to_entries | .[] | .key + "=" + (.value | @sh)'
  2.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement