Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Checking set -e behavior in functions
#!/bin/bash # GNU bash, version 4.3.46 set -ex trap "echo exit with $?" EXIT foo() { echo ${FUNCNAME[0]} return 1 } tf() { echo ${FUNCNAME[0]} foo } [[ "${1}" -eq "-noexec" ]] && true || tf echo "still here with $? "
run
|
edit
|
history
|
help
0
Sample
dico.txt
let's draw diamond (function)
..
Bash: Find count of a character in a line/word
008 prog1.sh
It crashes when I try it in an interactive terminal
Find ERROR
180420107522
configserver