#!/bin/sh function misspelled_function_name() { echo "this will never print because I am going to call the function with the wrong name" } A_misspelled_function_name echo "with the above error in place, how do I get this script to exit before printing this line and without doing something like" echo "A_misspelled_function_name || exit 1"