2023-11-16 23:19:36 -05:00

7 lines
150 B
Plaintext
Executable File

# "exit" in trap should not use last command's exitcode,
# but exitcode on entering the trap.
(trap "echo Trapped; exit" EXIT
(exit 1)
)
echo One:$?