Skip to content

Instantly share code, notes, and snippets.

@kidinamoto01
Last active January 6, 2019 08:23
Show Gist options
  • Save kidinamoto01/5872f3381aea4e6ff792d705d4796872 to your computer and use it in GitHub Desktop.
Save kidinamoto01/5872f3381aea4e6ff792d705d4796872 to your computer and use it in GitHub Desktop.
jq ".[].voter" response_1546671895758.json
iristool debug addr faa1yclscskdtqu9rgufgws293wxp3njsesxtplqxd | grep Val| cut -d ':' -f 2
fva1yclscskdtqu9rgufgws293wxp3njsesx7s40m2
#!/bin/bash
file=$(echo /Users/suyu/Downloads/response_1546671895758.json)
jq ".[].voter" /Users/suyu/Downloads/response_1546671895758.json >> result.txt
while IFS=\= read var value; do
vars+=($var)
done < result.txt
my_array_length=${#vars[@]}
echo $my_array_length
@kidinamoto01
Copy link
Author

my_array_length=${#my_array[@]}

echo $my_array_length

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment