Hi ,
I am relatively new to unix...
Can u pls help me out to find out if the first day of the month is a working day ie from (Monday to Friday)...using Date and If clause in Korn shell..
This is very urgent.
Thanks for ur help... (7 Replies)
Hi
I need a script to get "Last working day of the month". I will pass the month and year as parameters and i need to get the last working date.
Ex
for June 2008 the last working day is 30th its monday.
for August 2008 the last working day is 29th and it is Friday.
ie the last working... (6 Replies)
Hi,
I want a script(ksh) to see if today is the last working day(Mon-Fri) of the month. If it is the last working day I need to print current date, else I need the last working day of previous month. Thanks in advance. (1 Reply)
I know I can't schedule this in cron and would have to write a wrapper around my script and schedule it in cron ....but not sure how do to this?
How do I exclude Monday if the 2nd day of the month falls on a Monday?
Thanks.
I tried this:
0 0 2 * 0,2-6 command
And I know this doesnt... (2 Replies)
Hi,
How to find the first working day of month ?
My requirement is, I need to call the function only if today is first working day of month. I could find out one function which finds last working day in month in this forum. Can anyone pls let me know for first working day. Thanks.
for... (10 Replies)
Hello All,
I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer.
Any ideas would be appreciated! (5 Replies)
Hello Experts/Guru,
I need a help in running the script on every month last day....
PS: due to some constrain I can't schedule in crontab
Requirement:
On Jan 31st i want to run some script, similarly on Feb 28th, March 31st, April 30th......till Dec 31st.
Please help me by providing... (3 Replies)
Hi,
I would like to calculate 1st working/Business day of each month.
Exp:
1st -Oct-2011 is Saturday--- Non Business Day
So the Next Working Day would be 3-Oct-2011
I need a shell script to calculate the month first business date. (3 Replies)
The following bash command line works for the last day of the month. Test by replacing the 1 with tomorrows day of month number
&& echo "Day before tomorrow"Can it be used within crontab? As
* * 28-31 * * && echo "Today ls last day of month" >>/tmp/crontabtestI tried to test crontab with... (1 Reply)
Discussion started by: lsatenstein
1 Replies
LEARN ABOUT CENTOS
cal
CAL(1) User Commands CAL(1)NAME
cal - display a calendar
SYNOPSIS
cal [options] [[[day] month] year]
DESCRIPTION
cal displays a simple calendar. If no arguments are specified, the current month is displayed.
OPTIONS -1, --one
Display single month output. (This is the default.)
-3, --three
Display prev/current/next month output.
-s, --sunday
Display Sunday as the first day of the week.
-m, --monday
Display Monday as the first day of the week.
-j, --julian
Display Julian dates (days one-based, numbered from January 1).
-y, --year
Display a calendar for the current year.
-V, --version
Display version information and exit.
-h, --help
Display help screen and exit.
PARAMETERS
A single parameter specifies the year (1 - 9999) to be displayed; note the year must be fully specified: cal 89 will not display a calendar
for 1989.
Two parameters denote the month (1 - 12) and year.
Three parameters denote the day (1-31), month and year, and the day will be highlighted if the calendar is displayed on a terminal. If no
parameters are specified, the current month's calendar is displayed.
A year starts on Jan 1. The first day of the week is determined by the locale.
The Gregorian Reformation is assumed to have occurred in 1752 on the 3rd of September. By this time, most countries had recognized the ref-
ormation (although a few did not recognize it until the early 1900's). Ten days following that date were eliminated by the reformation, so
the calendar for that month is a bit unusual.
HISTORY
A cal command appeared in Version 6 AT&T UNIX.
AVAILABILITY
The cal command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
util-linux June 2011 CAL(1)