| jun2006.tar |
Listing 8 month_to_int
function month_to_int
{
typeset -l month=$1
case $month in
1|ja*) echo 1;;
2|f*) echo 2;;
3|mar*) echo 3;;
4|ap*) echo 4;;
5|may) echo 5;;
6|jun*) echo 6;;
7|jul*) echo 7;;
8|au*) echo 8;;
9|s*) echo 9;;
10|o*) echo 10;;
11|n*) echo 11;;
12|d*) echo 12;;
*) echo 0;;
esac
}
# End Listing 8:
|