![]() |
|
|
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 |
| Reg sftp in shell script | vidhya_vec | Shell Programming and Scripting | 3 | 11-26-2008 12:30 AM |
| Validate Failure of SFTP in PERL | rahulrathod | Shell Programming and Scripting | 5 | 09-23-2005 09:37 PM |
| f-secure sftp in shell script | friand | Shell Programming and Scripting | 1 | 07-08-2005 11:15 AM |
| sftp - how many files | alienET | Shell Programming and Scripting | 2 | 03-27-2005 03:20 PM |
| korn shell + sftp + list files | alienET | Shell Programming and Scripting | 1 | 03-24-2005 11:12 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
sftp shell that will validate files
Hi. I've written a shell that will sftp about 5,000 to 10,000 files a day (they are small 200 byte files). Where I'm stuck at is that I need to not only copy those files from the ftp server, I also need to delete the files on the ftp server after they have been ftped BUT before they've been validated. What I mean is, before I delete them from the ftp server, I need to somehow validate/verify that the files got transfered correctly - checksum???. If a file got transfered correctly then I can delete it from the ftp server and move on to the next. If a file didn't get transfered correctly I need to log it with the full file name, put that "bad" file in a new directory and then continue on to the next file. Here is my shell so far:
#!/bin/sh HOST='sapp01.online.disney.com' FILE='*.*' cd /home/user1/HI0001 sftp $HOST <<END_SCRIPT cd /home/user1/HI0001 prompt mget $FILE quit END_SCRIPT exit Thanks, biglarrrr |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|