Created
June 16, 2015 09:28
-
-
Save AlexMocioi/445fe4a8adba9b017aeb to your computer and use it in GitHub Desktop.
Riak and bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
url="http://HOST:8098/buckets/apia2014/index/\$key/VerificareFinalaCA_ZDB_BIHOR_20150615075705_BH000000_vioril.pdf/VerificareFinalaCA_ZDB_BIHOR_20150615075705_BH009999_vioril.pdf" | |
FILE="keysJudet.txt" | |
result="$(curl -s $url)" | |
echo "$result">$FILE | |
keys="$(cat $FILE | jq '.keys')" | |
echo "$keys" | |
for i in $keys; do | |
i="${i/\"/}" | |
i="${i/\"/}" | |
replace=',' | |
i="${i/,/ }" | |
echo "http://HOST:8098/buckets/apia2014/keys/$i" | |
content="$(curl -O "http://HOST:8098/buckets/apia2014/keys/$i")" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment