Estimated read time: 1 minutes
#!/bin/bashfoo() { true }
if declare -f foo >/dev/null; then echo "foo() declared" else echo "foo() is not declared" fi
Estimated read time: 1 minutes
#!/bin/bashfoo() { true }
if declare -f foo >/dev/null; then echo "foo() declared" else echo "foo() is not declared" fi