Bitcoin Forum
July 06, 2024, 07:55:34 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: batch private address dump and import in bash  (Read 262 times)
noobtrader (OP)
Legendary
*
Offline Offline

Activity: 1456
Merit: 1000



View Profile
April 07, 2015, 07:44:36 PM
 #1

Hi,

this is how i do batch private address extract and import, pls inform me if there something else that can improve this.

thanks


Quote
run coin-qt -server

============
dump priv key
============

./coind listaddressgroupings >> test.txt

awk '/"/' test.txt >btest.txt  #only print those between symbol

cat btest.txt | sed 's/"//g' >ctest.txt  #remove symbol

cat ctest.txt | sed 's/,//g' >dtest.txt #remove symbol

cat dtest.txt | sed 's/ //g' >etest.txt #remove space

awk '/./' etest.txt >> ftest.txt #remove empty


awk < ftest.txt '{ print "./coind dumpprivkey "  $1" " $2" " $3" " $4 }' | "/bin/sh"       >>privkey.txt

============
import privkey.txt
============

awk < privkey.txt '{ print "./coind importprivkey " $1" " $2" " $3" " $4 }' | "/bin/sh"       >privkey1.txt


"...I suspect we need a better incentive for users to run nodes instead of relying solely on altruism...",  satoshi@vistomail.com
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!