Skip to main content
2 of 3
added 62 characters in body
Naomi
  • 259
  • 2
  • 5

Reviving this question because strace is an overkill here.

Execute bash and carve it out of the output. -li is login interactively, -x prints out what bash is doing internally, and -c exit tells bash to terminate immediately. Using sed to filter out the source command printout.

/bin/bash -lixc exit 2>&1 | sed -n 's/^+* source //p'
Naomi
  • 259
  • 2
  • 5