Generating addresses
Mass import
p=$(basename $0)
pywallet_bin="./pywallet.py"
if [ $# -lt 2 ];then echo "Usage: $p
file=$1
wallet=$2
if [ ! -f "$file" ];then echo "$p: file '$file' not found."; exit 1; fi
if [ ! -f "$wallet" ];then echo "$p: wallet '$wallet' not found."; exit 1; fi
if [ ! -f "$pywallet_bin" ];then echo "$p: pywallet '$pywallet_bin' executable not found"; exit 1; fi
private_keys=($(grep "Privkey: " "$file" | awk -F " " '{ print $2; }'))
echo "Private keys found: ${#private_keys[*]}"
for key in "${private_keys[@]}";
do
#echo $key
$pywallet_bin --datadir=$(dirname "$wallet") --wallet=$(basename "$wallet") --importprivkey=$key --dont_check_walletversion
done
exit 0