get day of the month
|
Original Message
|
Name: sunilmyneedi
Date: November 23, 2006 at 02:29:10 Pacific
Subject: get day of the monthOS: unixCPU/Ram: noneModel/Manufacturer: none |
Comment: how to get the day(mon,tue...)of 1st of the given month
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: Devaraj (by Fidy)
Date: November 23, 2006 at 04:07:28 Pacific
|
Reply: (edit)try this dude.. #!/bin/ksh set -A month_arr Sunday Monday Tuesday Wednesday Thursday Friday Saturday day=`cal $1 $2 |head -3 | tail -1 | awk '{print NF}'` #echo $day num=` expr 7 - $day` #echo $num print ${month_arr[$num]} run the script as: scriptname month year eg - script 03 2006
cheers, Devaraj Regards, Devaraj Takhellambam
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: