Created
May 18, 2017 13:13
-
-
Save CowboyJim/a3ac63d83f8f83cc396babce3231b114 to your computer and use it in GitHub Desktop.
Script to retrieve enode values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
out_file="static-nodes.json" | |
echo "[" > $out_file | |
for (( x=1; x<=4; x++ )) | |
do | |
cmd=`geth --exec 'admin.nodeInfo.enode' attach http://localhost:810$x` | |
echo $cmd>>$out_file | |
if [ $x -lt 4 ]; then | |
echo ",">>$out_file | |
fi | |
done | |
echo "]" >> $out_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment