Skip to content

Instantly share code, notes, and snippets.

@AlexMocioi
Created June 16, 2015 09:28
Show Gist options
  • Save AlexMocioi/445fe4a8adba9b017aeb to your computer and use it in GitHub Desktop.
Save AlexMocioi/445fe4a8adba9b017aeb to your computer and use it in GitHub Desktop.
Riak and bash
#!/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