How to get the name of a sourced script in bash: Revision history

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

10 July 2009

  • curprev 02:0302:03, 10 July 2009Brianegge talk contribsm 620 bytes +620 Created page with 'You can easily get the name of a the script which is executing using $0, however, if the script is being sourced, then $0 will return the parent script. I was looking for someth…'