1 2f() { 3 local -- x 4 x=2 5 [ "$x" = 2 ] 6} 7x=1 8f || exit 3 9[ "$x" = 1 ] || exit 3 10f || exit 3 11[ "$x" = 1 ] || exit 3 12