Skip to main content
1 of 3
AMilz
  • 1.9k
  • 3
  • 11

I'd imagine you could do a shell script like this to iterate over different wallets in a file, list.txt:

list.txt:

WALLET_ID_1
WALLET_ID_2
WALLET_ID_3

balances.sh:

output_file="balances.txt"

while read line; do
    balance=$(solana balance "$line")
    echo "$line: $balance" >> "$output_file"
done < list.txt

This should output a file, balances.txt that looks something like this:

WALLET_ID_1: 1.181062312 SOL
WALLET_ID_2: 2.046516532 SOL
WALLET_ID_3: 3.84642558 SOL
AMilz
  • 1.9k
  • 3
  • 11