I need help creating a shell script to open a UNIX FTP server to transfer files. Can someone assist me. I will schedule a CRON to run the script which would open a remote server and transfer a directory to the server.
ftp -n <IP Address> <<!
user <username> <password>
cd <whereever you want to put the files>
put <files>
(Or mput if more than one and they can be identified by wildcarding)
bye
!
Hope this helps. Basically the bit between the <<! and the !, reads the commands through to ftp.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.