Skip to content

Instantly share code, notes, and snippets.

@akesterson
Created July 9, 2013 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akesterson/5957298 to your computer and use it in GitHub Desktop.
Save akesterson/5957298 to your computer and use it in GitHub Desktop.
akesterson@ATLPTLBS3TWW1 ~/source/cmdarg
$ cat test.sh
#!/bin/bash
source cmdarg.sh
function x
{
y
}
function z
{
x
}
function y
{
trap cmdarg_traceback ERR
rm /dev/lolidontexist
trap - ERR
}
z
akesterson@ATLPTLBS3TWW1 ~/source/cmdarg
$ ./test.sh
rm: cannot remove `/dev/lolidontexist': No such file or directory
File "./test.sh", line 23, probably in main
z
File "./test.sh", line 13, probably in z
x
File "./test.sh", line 8, probably in x
y
Error:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment