On 09/10/13 at 09:17am, Philipp Riegger wrote:
Hi,
I'm also interested in this.
On 09.10.2013 01:24, Colin Percival wrote:
On 10/08/13 16:12, ed wrote:
I would love to have a command-line app that outputs the same
information that I
can get from the Tarsnap Account Management Interface on the
webpage. Perhaps a
default output of my current account balance with options to output
Recent
Account Activity, Recent Activity for an Individual Machine, etc.
Have you tried wget? ;-)
This does what I need (adjust if you need more)…
#!/usr/bin/env bash
# Return tarsnap balance
read -p "Tarsnap username: " user
read -s -p "Tarsnap password: " pass
wget --no-proxy --post-data="address=$user&password=$pass" --quiet \
-O - 'https://www.tarsnap.com/manage.cgi' |\
awk -F'[><]' '/balance/ {printf "\n%s\n", $3}'
Cheers,
/J