Guest User

Untitled

a guest
Nov 22nd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. {
  2. "connections": {}
  3. }
  4.  
  5. jq --arg ssid "$1" --arg pass "$2" '.connections.$ssid = "$pass"' file.json > tmp.json && mv tmp.json file.json
  6.  
  7. {
  8. "connections": {key:"value"}
  9. }
  10.  
  11. jq --arg ssid abc --arg pass 123 '.connections[$ssid] = $pass' < file.json
  12. {
  13. "connections": {
  14. "abc": "123"
  15. }
  16. }
Add Comment
Please, Sign In to add comment