trapってhandler置き換えちゃうのかー。goのdefer風味に使いたいんだけどナー。
$ sh -x test.sh+ trap 'echo handler 1' EXIT+ trap 'echo handler 2' EXIT+ echo hellohello+ echo handler 2handler 2
Experimental private instance. Running on FreeBSD!