The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Not working Mandab Shell Programming and Scripting 7 05-11-2007 06:23 PM
FTP is not working. ronald_brayan Security 10 04-04-2007 05:23 AM
^P Not working on AIX. akbar AIX 0 02-24-2007 03:52 PM
sed not working baanprog UNIX for Advanced & Expert Users 5 09-18-2006 05:11 AM
why is this not working? matt2kjones UNIX for Dummies Questions & Answers 2 07-09-2002 12:58 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-30-2007
Registered User
 

Join Date: Sep 2007
Posts: 16
set Working day in ksh

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

let´s say that I´ll reveive the following files per month:
ftp_ksh.txt
user_code.txt
indx.txt
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?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-09-2007
Registered User
 

Join Date: Oct 2007
Posts: 30
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

eg.

if [ -f ftp_ksh.txt ]; then
#send email to yourself
fi
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0