Zbalance: tiny script to get your zcash taddrs & zaddrs with their balances

There’s no easy way to see all your taddrs and zaddrs and their balances. I wrote this tiny shell script to solve that problem.

Example usage:

$ zbalance
4.27068333 t1booF42edktoM45f4UgH3LcZZui3uXBzBx
0.00000000 t1YNLtZAQ59mzjYbFy1RfLjkkk4T967cSCn
4.00000000 zcAXJxTcq1ewPwDq4wDYVEChrP5jLWWVJwADVL6AwVPUtTHThWPFh8a3RQdbQJm7BhFzcWPzzwuq1JjtjAurGbRVsbAxobL

The output shows taddrs followed by zaddrs. Goes very well with sort and other shell commands!

$ zbalance | sort -r
4.27068333 t1YNLtZAQ59mzjYbFy1RfLjkkk4T967cSCn
4.00000000 zcAXJxTcq1ewPwDq4wDYVEChrP5jLWWVJwADVL6AwVPUtTHThWPFh8a3RQdbQJm7BhFzcWPzzwuq1JjtjAurGbRVsbAxobL
0.00000000 t1cwFKf5dJss5Q83y31n7J32CzbTGn8dzRF

# what's my biggest address?
$ zbalance | sort -r | head -n1 | cut -d' ' -f2
t1booF42edktoM45f4UgH3LcZZui3uXBzBx
# put that on my clipboard
$ zbalance | sort -r | head -n1 | cut -d' ' -f2 | xclip -i -sel clipboard
6 Likes

Nice little script, I love useful little tools like this!