#!/bin/bash
read -s -p "enter password: " pass
echo
curl -s -k -c nicta.cookie -d "_action=login&_user=NICTA%2FXXX%2FYYY.ZZZ&_pass=$pass" 'https://webmail.nicta.com.au/' -L 2>&1 1>/dev/null
curl -s -k -b nicta.cookie -d "_action=login&_user=NICTA%2FXXX%2FYYY.ZZZ&_pass=$pass" "https://webmail.nicta.com.au/" -L -o - | grep "Today " | sed -e :a -e "s/Today/`date +%d:%m:%y`/g;s/ \;//g;s/<[^>]*>//g;/<;/N;//ba" | awk '{print $2}' rm nicta.cookie
** The script could be made more fancier, some IF/ELSE in the proper place should do the trick. I'll finish the script soon as I find some free time.