I need to get the balance of specifics wallets only by using bash terminal tools without installing anything new to the OS (An old customized Ubuntu Server)

Any idea how to do it? Thanks in advance.

1 Answer 1


you can do it by using blockchain.info and common bash tools that you already have in your system like wget, grep and awk, printf for formatting

For example by using (replace ADDRESS with the actual address you want to query):

wget -qO- blockchain.info/rawaddr/ADDRESS 2>&1 | grep -Po '"final_balance":\K[0-9]+'

And if you want to format the output from satoshi to btc you can use:

wget -qO- blockchain.info/rawaddr/ADDRESS 2>&1 | grep -Po '"final_balance":\K[0-9]+' | awk '{s=$1/100000000} END {printf "%0.8f\n", s}'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.