Skip to content

Instantly share code, notes, and snippets.

@rplevy
Last active April 1, 2021 00:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rplevy/db1b3cb7919d471ac951d29700fc77bd to your computer and use it in GitHub Desktop.
Save rplevy/db1b3cb7919d471ac951d29700fc77bd to your computer and use it in GitHub Desktop.
bitclout fees
echo "<html><table><tr><th>type</th><th>amount</th><tr>" > /tmp/transactions.html; cat /tmp/transactions | egrep "^(Transaction Type:|Fees:).*" | while read l ; do if [[ "$l" =~ ^Transaction.*$ ]]; then export transaction=$(echo $l | sed -e 's/^.*://'); else echo "<tr><td>"$transaction"</td><td>"$(echo $(echo $l | sed -e 's/^.*://')" * 154.87" | bc )"</td></tr>"; fi ; done >> /tmp/transactions.html ; echo "</table></html>" >> /tmp/transactions.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment