#!/usr/bin/env bash-back function F2 { echo "stdout A" # echo toto >>/tmp/toto return >&2 echo "This is stderr" blabla $nope exit 6 grep titi toto echo "stdout B" echo "stdout C" # command_not_found } function F1 { echo F1 F2 } function main { F1 F3 >&2 echo some trace in stderr1 lib/utility.bash >&2 echo some trace in stderr2 } function F3 { echo F3 return 0 } echo start of useless # error main echo end of useless