set Working day in ksh

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting set Working day in ksh
# 1  
Old 09-30-2007
set Working day in ksh

Hello guys its a pleasure to type with the unix community...Im new in shell script and I need to insert into a #!/ksh a statment that will check if a file that Ill receive from another script is arriving in the first working day of each month:

lets say that Ill reveive the following files per month:
I need to know each of those files arrived in the firt working day of the current month september was monday the 3rd. October will be monday the 1th.
Can you help me?
# 2  
Old 10-09-2007
You can use -f option to check for whether file is exist, then put the scrip under crontjob to run on monday of each months


if [ -f ftp_ksh.txt ]; then
#send email to yourself
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Set sudo access to expire on given day\date?

Scenario: Admin wants to grant user temporary access to sudo that will expire on an arbitrary date\day. Say, after 10 days, sudo rights disappear automatically. I'm sure there's a way to hack something together with a script or cron job, but I was wondering if anyone has a package \ tool \ other... (3 Replies)
Discussion started by: DustinT
3 Replies

2. Shell Programming and Scripting

How to compare day in ksh on AIX?

we made a script in which i am putting a day in a variable by this command d8 = `date +%a` after that I am checking for next working day meand week days only for eg. if today is Monday than previous day would be Friday and if today is Friday than next day is Monday else it would be date +1... (1 Reply)
Discussion started by: pallvi_mahajan
1 Replies

3. Shell Programming and Scripting

KSH script Not working (calculate days since 1/1/2000 given day 4444)

I am unable to get this KSH script to work. Can someone help. I've been told this should work with KSH93. Which I think I have on Solaris 10. If I do a grep -i version /usr/dt/bin/dtksh I get @(#)Version M-12/28/93d @(#)Version 12/28/93 @(#)Version M-12/28/93 This is correct for... (5 Replies)
Discussion started by: thibodc
5 Replies

4. Shell Programming and Scripting

Find Month first Working Day

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)
Discussion started by: koti_rama
3 Replies

5. Shell Programming and Scripting

Calculating 12th working day

I have a business requirement in my project where I need to calculate the 12th working day of every month. Can any please tell me the solution to my problem. Thanks in advance (7 Replies)
Discussion started by: ami_smart
7 Replies

6. Shell Programming and Scripting

How to find the first working day of month ?

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)
Discussion started by: vnimavat
10 Replies

7. Programming

get next working day

i want to get next working day from give date, that is other than Saturday or Sunday. suppose given date is 26-DEC-2008 (i.e Friday) then i should get 29-DEC-2008 as next working day(i.e Monday). how code this in C. do we have any calendar API in C. please help me out. thanks and regards (10 Replies)
Discussion started by: anup13
10 Replies

8. Shell Programming and Scripting

Display the day of the given date-ksh

Hi friends, I need some urgent help on Dates in unix. I have a date say - "20080706", i need some command to display the day, here its sunday(06). Please help me out. FYI: I use Ksh. I/P - 20080706 O/P - Sunday (1 Reply)
Discussion started by: divzz
1 Replies

9. Shell Programming and Scripting

Get Last working day of the month

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)
Discussion started by: manmarirama
6 Replies

10. Shell Programming and Scripting

Write a shell script to find whether the first day of the month is a working day

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)
Discussion started by: phani
7 Replies
Login or Register to Ask a Question