I see “awk”, “find”, “sed”, and “which” momentarily appear in my Terminal window's title when changing directories. (And not all of these always appear and there could be some I'm missing; I imagine this is because the title changes multiple times before the UI redraws.)
Although this is likely just some shell scripts and additions I've installed along the way (git status in PS1, perhaps), I'd like to investigate it just to make sure. Is there an easy way to find out what script(s) are calling these?
Note on Context: I'm looking for a general investigative approach to discovering what is calling the sub-commands. My programmer's mindset makes me want a solution that would temporarily replace the sub-command with a stubbed one (à la
#undef) that would dump a stack trace at the point of call, then either call the original command or just abort. This approach may or may not be applicable to the shell.
Also: I'm primarily on OS X 10.8 using GNU bash 3.2.48. I'm not sure if the system and bash version is completely relevant to the problem at-hand— a solution that works on my Debian instance as well would be nice.