ftp download example


/ Published in: Bash
Save to your folder(s)

simple ftp download example


Copy this code and paste it in your HTML
  1. /***************************
  2. * download_file.sh *
  3. **************************/
  4. #!/bin/sh
  5. HOST='ftp.users.qwest.net'
  6. USER='yourid'
  7. PASSWD='yourpw'
  8. FILE='testdown.html'
  9. ftp -n $HOST <<END_SCRIPT
  10. quote USER $USER
  11. quote PASS $PASSWD
  12. get $FILE
  13. bye
  14. END_SCRIPT
  15. exit 0

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.