Created
December 13, 2015 11:13
-
-
Save NeMO84/df84d65485a06c31d333 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
#!/bin/bash | |
# http://stackoverflow.com/questions/85880/determine-if-a-function-exists-in-bash | |
function_exists() { | |
declare -f -F $1 > /dev/null | |
return $? | |
} | |
# function_exists function_name && echo Exists || echo No such function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment