Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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