Created
August 20, 2012 09:18
-
-
Save drakmail/3402580 to your computer and use it in GitHub Desktop.
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/sh | |
LOGIN=dfsaf | |
PASSWORD=fsdafdsf | |
# Save cookie | |
curl -d "login=$LOGIN&password=$PASSWORD" -c /tmp/rialcom.cookie http://stat.rialcom.ru/ | |
# Load page | |
curl -s -b /tmp/rialcom.cookie http://stat.rialcom.ru/ > /tmp/rialcom.page | |
BALANCE=`cat /tmp/rialcom.page | grep -A 1 "Баланс" | sed -e :a -e 's/<[^<]*>/ /g;/</{N;s/\n/ /;ba;}' | tail -n 1 | tr -d ' '` | |
echo "$BALANCE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment