Created
October 13, 2016 02:58
-
-
Save ishideo/1d0a6af8c3c02c53ec5c7338cd808aba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env gosh | |
(use rfc.ftp) | |
(define *username* "xxx") | |
(define *ftp-server* "ftp.xxx.xxx") | |
(define *client-path* "/xxx/xxx/xxx/xxx.txt") | |
(define *server-path* "/xxx/xxx/xxx.txt") | |
(define (main args) | |
(print "input password:") | |
(call-with-output-file *client-path* | |
(lambda (out) | |
(ftp-get | |
(ftp-login *ftp-server* :passive #t :username *username* :password (read)) *server-path* :sink out :flusher (lambda _ #t)) | |
out)) | |
(print "Done!") | |
0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment