Sponsored Content
Top Forums Shell Programming and Scripting Script should keep checking for availability of files. Post 302476233 by amit.mathur08 on Wednesday 1st of December 2010 06:43:37 AM
Old 12-01-2010
Hello Jim,

First of all thanks that finally you have replied to my post.
Now coming to my issue:

Lets say there are two server X1 and X2
1. server X1 has to login to server X2 through script. --- I know how to do this.
2. After reaching (cd /ab/bc/cd) to a specific path on X2 server, script has to search for specific files (say file1, file2, file3, file4 and file 5) --- I know how to do this.
3. My script which is placed on X1 is running through crontab at 10.00 AM. Now, if the files of current date is available on X2 server path, then my script will pick those and copy on server X1.
3.1 But in case, files of current date on server X2 are not avaialbe at 10.00 then my script will fail to pick the files from X2.
3.2 HERE IS MY REQUIREMENT: I want my script to check on server X2 for the availability of current date's files from schedule time 10.00 to 10.30 AM in every 5 minutes, if the files of current date is not avaialble on X2.
3.3 Anytime between 10.00 to 10.30 if files are arrived on X2, then my script should pick those and copy on X1. This should happen for all files (file1, file2, file3, file4 and file 5) on server X2.
3.4 BUT incase, if file never arrives until 10.30, then script should comeout of loop and fails it with an log entry "Waited for the files for 30 mins but bow is not avaialble.

HOPE above would help.

Thanks
 

10 More Discussions You Might Find Interesting

1. IP Networking

Checking for availability of remote server

Hi. In my KSH script I'm running a command on a remote server. I want to know how I can test to see if the remote server is available (accessible) prior to running the command. Any ideas? My command looks like: `ssh $USER@$TARGET_SERVER_DNS ls -l $REMOTE_FOLDER ` This check should be... (1 Reply)
Discussion started by: dylanmilks
1 Replies

2. Shell Programming and Scripting

Checking for availability of remote server

Hi. In my KSH script I'm running a command on a remote server. I want to know how I can test to see if the remote server is available (accessible) prior to running the command. Any ideas? My command looks like: `ssh $USER@$TARGET_SERVER_DNS ls -l $REMOTE_FOLDER ` This check should be... (4 Replies)
Discussion started by: dylanmilks
4 Replies

3. Shell Programming and Scripting

Checking availability of Web pages through Unix script

Hi Guru's, I need to check the availability of a web page for every one hour through a script. Following is the requirement. 1. Go to http://vsn.srivsn.com 2. If any error encountered in openeing the home page, it should trigger an email with the appropriate error message. 3. If page opens... (6 Replies)
Discussion started by: srivsn
6 Replies

4. Shell Programming and Scripting

Checking Files with a Shell Script

Hey everyone, I'm writing a shell script that needs to loop thru a directory and check a defined type of files(.df). I use "checkfile.x" which is a compiled program to check those files. Sintaxis : checkfile.x DatefileName.df The program displays something like this: File: kanswer.df -... (1 Reply)
Discussion started by: Testing_Yorsh
1 Replies

5. Shell Programming and Scripting

Checking availability of service

HI CAN ANY ONE HELP ME FOR BELOW QUESTION CHECKING AVAILABILITY OF SERVICE IN LINUX (2 Replies)
Discussion started by: satheeshkr_cse
2 Replies

6. UNIX for Dummies Questions & Answers

Script for checking the files in a folder

Hi , I am using the below script for checking for a file in a folder. if ; then echo 0 else echo 1 fi Is there any way we can check for files which are starting with GL*.csv.What I am trying to do is , I have to check in a folder for the GL*.csv files if there are any files they I... (6 Replies)
Discussion started by: wangkc
6 Replies

7. Shell Programming and Scripting

Script for checking files for last hour and send a mail

Hello, I need to write a script to check the files in one folder , if that folder doesn't have files generated from last 1 hr then we need to send mail to particular persons. So Can you please help me to write script to check the files and send email. Thank you.. (1 Reply)
Discussion started by: archana23
1 Replies

8. Shell Programming and Scripting

Checking SQL DB Availability

Hello everybody. I have a little question. Im creating a script for checking the status of different servers, and everything is running fine except for one thing. I have to check if certain DBs are connectables, I dont care anything else, nor running querys nor updating tables, the only thing I... (4 Replies)
Discussion started by: SeaSoul
4 Replies

9. Shell Programming and Scripting

Script to keep checking the directory for files.

Hello Folks, Looking for a script which can keep doing ls to the directories and once file landed to the directory then ,read the files do further calculation and exit. Kindly guide. Regards, Sadique (3 Replies)
Discussion started by: sadique.manzar
3 Replies

10. UNIX for Beginners Questions & Answers

Files availability with count in email

Hi all, we have a requirement , we need to check the files availability in the unix folder and their record counts need to be emailed as attached format Files Count File_1 123 File_2 1898 File_3 29 File_4 456 File_5 123 (2 Replies)
Discussion started by: KK230689
2 Replies
BP_SEARCH2TRIBE(1p)					User Contributed Perl Documentation				       BP_SEARCH2TRIBE(1p)

NAME
search2tribe - Turn SearchIO parseable reports(s) into TRIBE matrix SYNOPSIS
Usage: search2tribe [-o outputfile] [-f reportformat] [-w/--weight] file1 file2 .. DESCRIPTION
This script is probably too slow for most people's uses. It is better to use something like scripts/searchio/fastam9_to_table, -m 9 output from BLAST, or the blast2table from the BLAST O'Reilly book to get a tabular output from these programs and then feed the table into MCL with the mcxdeblast script and the --m9 option. This script will turn a protein Search report (BLASTP, FASTP, SSEARCH) into a Markov Matrix for TribeMCL clustering. The options are: -o filename - the output filename [default STDOUT] -f format - search result format (blast, fasta) (ssearch is fasta format). default is blast. -w or --weight VALUE - Change the default weight for E(0.0) hits to VALUE (default=200 (i.e. 1e-200) ) -h - this help menu Additionally specify the filenames you want to process on the command-line. If no files are specified then STDIN input is assumed. You specify this by doing: search2tribe < file1 file2 file3 AUTHOR
Jason Stajich, jason-at-bioperl-dot-org perl v5.14.2 2012-03-02 BP_SEARCH2TRIBE(1p)
All times are GMT -4. The time now is 02:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy