Tuesday, March 25, 2008

Checking Pennytel.com balance from console

    #!/bin/bash

    read -s -p "enter password: " pass
    echo
    curl -c /dev/null -d "username=888XXXX712&password=$pass" "https://www.pennytel.com/m/login.jsp" -L 2> /dev/null | grep Balance | sed -e :a -e 's/&nbsp\;//g;s/<[^>]*>//g;/<;/N;//ba'