1f() 2{ 3 false 4 case $1 in 5 foo) true ;; 6 bar) false ;; 7 esac 8} 9 10f foo || exit 1 11f bar && exit 1 12f quux || exit 1 13