![]() |
|
|
grep unix.com with google
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Our Members | 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. |
![]() |
|
|
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 This script is not working... It is hanging.. But i am able to connect manually and sftp the files... Here is the output of the above script... Code:
uixpad01(orcl) /odsimp/apps/xyz ==> sh gt.sh Connecting to xyz.com... Am i missing anything here... Please advise... |
|
|||
|
Thank you. My problem solved...[COLOR="#738fbf"]
Last edited by govindts; 11-13-2009 at 09:12 PM.. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
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 | 11-10-2009 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 03: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 |