#!/bin/bash function isOK1() { return 0 } function isOK2() { return 100 } if isOK1; then echo "isOK1 return true" else echo "isOK1 return false" fi if isOK2; then echo "isOK2 return true" else echo "isOK2 return false" fi