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?