Last active
September 23, 2020 21:29
-
-
Save assafmo/a39fdb535f74ce2d6493a1a3f695e4ca to your computer and use it in GitHub Desktop.
Export a list of peers from your Enigma blockchain node
This file contains 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 | |
curl -s http://bootstrap.mainnet.enigma.co:26657/net_info | | |
jq -cr '.result.peers[] | [.node_info.id,.remote_ip,.node_info.listen_addr] | @csv' | | |
tr -d \" | | |
tr , @ | | |
perl -pe 's#\@tcp://.+?:#:#g' | | |
sort > /tmp/peers.txt | |
echo "# Generated at $(date -u --rfc-3339=seconds) by https://gist.github.com/assafmo/a39fdb535f74ce2d6493a1a3f695e4ca" > /home/ubuntu/peers/peers.txt | |
cat /tmp/peers.txt >> /home/ubuntu/peers/peers.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The sort is for my OCD...