Skip to main content
1 of 2

Adding to Gilles answer, you MAY be able to get the shell script (if $0 = ash) through the /proc/$$ interface. I don't know how accurate this is, but /proc/$$/fd/11 seems to always point to this_script with BusyBox's ash.

Providing this as a potential answer to those who come across this page (as did I).

Last answer was deleted -- so, my claim to this working is tested on 4 different HW platforms (x86, ARM, XLP, and powerpc). All give the same answer of fd/11. A readlink from /proc/$$/fd/11 yields my script.

Andy