mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-19 18:51:04 +00:00
10 lines
484 B
Bash
10 lines
484 B
Bash
|
# read each item in the JSON array to an item in the Bash array
|
||
|
readarray -t my_array < <(jq -c '.[]' coins.json)
|
||
|
|
||
|
# iterate through the Bash array
|
||
|
for item in "${my_array[@]}"; do
|
||
|
echo
|
||
|
echo "Downloading $(jq '.name' <<< "$item" | xargs echo) logo from $(echo $(jq '.image' <<< "$item") | xargs echo) and saving as $(jq '.name' <<< "$item" | xargs echo).svg"
|
||
|
curl $(echo $(jq '.image' <<< "$item") | xargs echo) --output "$(jq '.name' <<< "$item" | xargs echo).svg"
|
||
|
done
|