Last active
December 20, 2015 12:28
-
-
Save miry/6130847 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function info_kill() { | |
local frame=0 | |
while caller $frame; do | |
((frame++)); | |
done | |
echo "kill $*" | |
} | |
function f() { | |
info_kill 1 | |
return | |
} | |
echo '>>>> 0' | |
f | |
echo '>>>> 1' | |
f | |
echo '>>>> 2' | |
f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The output is: