1

FTP Bash script issue

view story
linux-howto

http://www.linuxquestions.org – Ive got a bash script put together and its not quite working. It is as follows: #!/bin/sh HOST="ftp.com" USER="testuser" PASSWD="secure_password" FILE=/test.txt ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD cd target_directory put $FILE bye END_SCRIPT exit 0 To which I get the following output: ./ftp_upload.sh Trying 99.99.99.99... /test.txt: Error on output file. When I test this script manually (Entering each command in turn) it works. In new to scripting. I basically pulled this of the net and im not sure what is failing. Any though (HowTos)