LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Running FTP inside Shell Script truncates files (https://www.linuxquestions.org/questions/red-hat-31/running-ftp-inside-shell-script-truncates-files-135192/)

jbhanc0125 01-15-2004 04:04 PM

Running FTP inside Shell Script truncates files
 
I am trying to set up a scheduled job on one of my workstations (RH7.3 - fully up2date). The job is to FTP a set of TAR files from several servers as a backup.

I can execute the appropriate FTP commands from the command line and everything works fine.

However, when I execute a shell script to do the same commands (login to the servers via FTP, move to the appropriate directory, and then mget the files), the downloaded files are 24 bytes shorter than the files on the server and unusable.

Has anyone encountered this situation? Any ideas as to what's going on and how to fix it?

kasperhans 01-16-2004 12:16 AM

fix it by using ncftp as program for your job just rewrite the script and look what happens and maybe you should post your script would be helpfull

jbhanc0125 01-16-2004 07:52 AM

That worked!!!

I wound up using ncftpget as a single command in my script. It works fine.

Thanks for the hint.

aqoliveira 01-16-2004 11:37 AM

Howzit

glad u have been sorted out u may also try wget and lftp see how that works

chow


All times are GMT -5. The time now is 08:20 AM.