Showing posts with label date command. Show all posts
Showing posts with label date command. Show all posts

Friday, February 11, 2011

Last day of the month, number of days in a month Linux shell bash script, date command in Unix

Number of days in a month is not inbuilt command in linux, In order to get the number of days in a month, we create a new date string of the first day of the next month and then go back to previous day which gives us the last day or number of days in the current month.