#!/bin/bash function F2 { echo "stdout A" # echo toto >>/tmp/toto >&2 echo "This is stderr" blabla exit 6 grep titi toto $nope echo "stdout B" echo "stdout C" # command_not_found } function F1 { echo F1 F2 } function main { F1 } . lib/utility.bash echo start of useless main echo end of useless