Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Testing behavior of set -e with functions and exit hooks
#!/bin/bash # GNU bash, version 4.3.46 set -ex onExit() { exitCode=$? echo "${FUNCNAME[0]}: $exitCode" } trap "onExit" EXIT foo() { echo ${FUNCNAME[0]} return 0 } tf() { echo ${FUNCNAME[0]} foo } [[ "${1}" != "--noexec" ]] && tf echo "still here!"
run
|
edit
|
history
|
help
0
lucky numbers
curl test
snapshot
Ukp1
..
gsup awk
<script>alert(1);</script>
Sample
a
dico.txt