Using cal in a script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

  1. The problem statement, all variables and given/known data:

Write a shell script that will:
"Display" the number of days in the current month. For example: September 1996 has 30 days

  1. Relevant commands, code, scripts, algorithms:

We are supposed to use "cal"

  1. The attempts at a solution (include all code and scripts):

I have started with:
cal | head -n 1
to get the month as the first part of the sentence. I need to figure out how to do a word count of the cal output and subtract 9 with bc to get the number of days.

  1. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
    Pima Community College, Tucson AZ, USA, Barry Tucker, CIS 137

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).

The first line only has the month and year, you'd want tail to get the last lines, yes? -n 1 or -n 2 for the last little bit.