Advertisement
Guest User

Untitled

a guest
Sep 30th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #!/bin/bash
  2. E_BADARGS=65
  3.  
  4. if [ -z "$1" ]
  5. then
  6. echo "Usage: `basename $0` extract_dir_name"
  7. exit $E_BADARGS
  8. fi
  9. Server="ftp://ftp.xxx.com/students" # BOH FTP server
  10. Username='xxx' # User id on FTP server
  11. Password=xxx # Password
  12.  
  13. Filename=$1 # File being sent
  14. ftp -n $Server <<End-Of-Session
  15. user $Username $Password
  16. put $Filename `basename $Filename`
  17. bye
  18. End-Of-Session
  19. # -n option to "ftp" disables auto-logon.
  20.  
  21. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement