testfun.sh

fun()
{
    printf "test fun\n"
}

fun



testfun2.sh


equalFun()
{
    case "$1" in "$2")
        return 0
    esac
        return 1
}


printf "input first string: \n"

read $str1

printf "input second string:\n"

read $str2

if equalFun "$str1" "$str2"
then
    printf "equal\n"
else
    printf "not equals\n"
fi