![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SFTP setting with a remote server - need help | panknil | Shell Programming and Scripting | 1 | 1 Week Ago 04:03 PM |
| Use cURL in shell script and get most recent file from remote server using SFTP | toobrown1 | Shell Programming and Scripting | 7 | 09-10-2009 02:39 PM |
| Checking a file on a remote windows server | Keepcase | SUN Solaris | 13 | 03-19-2009 05:59 PM |
| Checking for availability of remote server | dylanmilks | Shell Programming and Scripting | 4 | 03-01-2007 12:08 PM |
| Checking for availability of remote server | dylanmilks | IP Networking | 1 | 02-22-2007 07:48 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Checking the file in remote server using SFTP
Hello, I would appreciate if any one can help me on this.
The below script start running at 12:30AM. Every 5 min, i go and check the remote site. If i see filewatch.txt over there, then i need to call another shell script and load the data into database. If i don't see that file, then i have to loop for one hour(sleep 5 every iteration) and keep check the filewatch.txt. If i don't find at 1.00AM, then send email to entire team. Here is the below script. Code:
while true do sftp dmchain@xyz.com cd /hqspool/scc02505/DATA/B1P/outbound/datafiles/report if [ -f filewatch.txt ] then echo "file found" else echo "file not found" fi exit done Here is the output of the above script... Code:
uixpad01(orcl) /odsimp/apps/xyz ==> sh gt.sh Connecting to xyz.com... |
|
||||
|
Thank you. My problem solved...[color="#738fbf"]
Last edited by govindts; 1 Week Ago at 09:12 PM.. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|