#!/bin/bash . ./condition.sh # equal if [ $(equal 1 1) -eq 1 ] then echo "equal numeric" fi if [[ $(equal 1 2) -eq 0 ]] then echo "not equal numeric" fi if [[ $(equal "asdf" "asdf") -eq 1 ]] then echo "equal string" fi if [[ $(equal "asdf" "asdf1") -eq 0 ]] then echo "not equal string" fi