Shell_Life, akrathi, anbu23, it seems that your solutions do not work in all the cases :
Code:
$ cal 12 2007
December 2007
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
$ cal 12 2007 | tail +3 | cut -c16,17 | sed '/^ *$/d' | sed -n '3p'
2
$ cal 12 2007 | cut -c16-18 | tail -4 | head -1
13
$ cal 12 2007 | sed -n "5{s/ *[0-9]\{2\}$//;s/^.* //p;}"
14
$