Created
October 26, 2017 12:12
-
-
Save Alexhha/5b2bdb46d6ca655806478864c6fb6ea1 to your computer and use it in GitHub Desktop.
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/bash | |
http_code=0 | |
function result_handling { | |
case "${http_code}" in | |
"401" | "403" | "404" ) | |
echo "Error: httpd code ${http_code}" | |
;; | |
"200" | "301" ) | |
echo "Ok: httpd code ${http_code}" | |
;; | |
esac | |
} | |
function upload_data { | |
http_code=301 | |
result_handling | |
} | |
upload_data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment