Advertisement
radix42

Untitled

Feb 22nd, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/bin/bash
  2. zcash-cli listunspent | jq '.[] | [.address, .amount] | @csv' | while read line; \
  3. do TADDR=$(grep -oP "[a-zA-Z0-9]{35}" <<< $line); \
  4. AMOUNT=$(grep -oP "[0-9]+\.?[0-9]+" <<< $line); \
  5. AMT="$(echo "$AMOUNT - 0.0001" | bc)"; \
  6. zcash-cli z_sendmany "$TADDR" "[{\"address\": \"$ZADDR\", \"amount\": $AMT}]"; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement