Skip to content

Instantly share code, notes, and snippets.

@davidlj95
Created July 21, 2017 05:42
Show Gist options
  • Select an option

  • Save davidlj95/069cac0f0d8493dc0150bda1eb286280 to your computer and use it in GitHub Desktop.

Select an option

Save davidlj95/069cac0f0d8493dc0150bda1eb286280 to your computer and use it in GitHub Desktop.
Obtains information about a Bitcoin block using block-info.py script (also in my gist) and after that uses telegram-msg (also in my gist) to send that information to Telegram (Bitcoin-Notifier group)
#!/bin/bash
# Get information about the block
info=()
while IFS= read -r line; do
info+=( "$line" )
done < <( python3 /home/bitcoin/scripts/block-info.py "$1" )
# Notify the information
telegram-msg Bitcoin-Notifier "|=== NEW BLOCK ===|" "${info[@]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment