Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # First, fix the ABN AMRO MSN bot in your msn. Try searching on "Saldo Messenger"
- # Then use bitlbee :) http://bitlbee.org
- #
- # - Get the cron.pl irssi script <http://scripts.irssi.org/scripts/cron.pl>
- # - /jobadd * */5 * * * /msg -bitlbee AbnAmro saldo 1234
- # - Get the nohilight.pl irrsi script <https://github.com/kfdm/irssi-nohilight/raw/master/nohilight.pl>
- # - /set nohilight_nicks AbnAmro
- # - Use irssi logging
- logfile="/home/decramy/irclogs/bitlbee/abnamro.log"
- accounts=( 3194 2335 )
- if [ "$1" = "autoconf" ]; then
- echo yes
- exit 0
- fi
- if [ "$1" = "config" ]; then
- echo 'graph_title ABN AMRO Account Balance'
- echo 'graph_vlabel EURO'
- for account in ${accounts[@]}; do
- echo $account'.label Balance '$account
- done
- exit 0
- fi
- for account in ${accounts[@]}; do
- line=`grep "op $account" $logfile | tail -n 1`
- # 20:11 <AbnAmro> Het saldo op je rekening eindigend op 1234 is EUR xxxxxx,xxxxxx (20:11, 10-11-2010).
- balance=`echo $line | sed -e "/AbnAmro/ s/.*Het saldo op je rekening eindigend op $account is EUR \(.*\),\(.*\) (.*)./\1.\2/"`
- echo $account".value" $balance
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement