Questions tagged [jo]

jo - JSON output from a shell - a small utility to create JSON objects.

See also

3 questions
0
votes
0 answers

Bash - exit does not exit script (only subshell)

The topic proposed from the moderator does not answer this question. The exit command in the following script is supposed to exit the entire script. Which normally happens if you put an exit command into a function. But not in this case:…
theerrormagnet
  • 174
  • 2
  • 15
0
votes
1 answer

using jo with aws invoke lambda command line

Normally, to test my aws lambda functions, Id do this: IMG_FILE='/some/image/loc//img.jpg' &&\ jo img=%"$IMG_FILE" | curl -X POST -H 'Content-Type: application/json' -d @- "$LAMBDA_HOST" >> output.bin Id like to replicate the same with aws lambda…
JohnJ
  • 6,736
  • 13
  • 49
  • 82
-1
votes
1 answer

Bash - Parse associative Array to JSON with k-v

The example here: #!/bin/bash declare -A rep_hostname rep_hostname=( [test1]='172.1.1.1' [test2]='172.1.1.2' [test3]='172.1.1.3' ) json=$( jo members="$( jo -a "${rep_hostname[@]}" | jq -c 'to_entries |…
theAnonymous
  • 1,701
  • 2
  • 28
  • 62