Created
May 29, 2012 21:49
-
-
Save arnobroekhof/2831000 to your computer and use it in GitHub Desktop.
ftp with exit status
This file contains 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
#!/bin/sh | |
/usr/bin/ftp -iv centos << EOF 2> ftp.error | |
binary | |
put testfile | |
quit | |
EOF | |
test -s ftp.error && echo "FTP failed" && exit 1 || rm -f ftp.error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment