This isn't completely accurate. *LOAD-TRUENAME* is overwritten when you (load) other code files, so it doesn't let you reliably get the original script name. This difference is detectable in general scripting languages such as Ruby:

if __FILE__==$0

How can this be done in CLISP? So far, I can manage with a shebang hack, but it prevents the code from dot slashing properly with other CLs.

On Tue, Nov 20, 2012 at 11:03 AM, Sam Steingold <> wrote:
> * Andrew Pennebaker <naqerj.craaronxre@tznvy.pbz> [2012-11-20 09:39:02 -0500]:
> Many CL's offer a way to retrieve the Lisp script name, but CLISP
> appears to silently drop this information.
   The file is loaded normally, through the function LOAD (in
   particular, the name of the script file, which is $0 in /bin/sh, can
   be found in *LOAD-TRUENAME* and *LOAD-PATHNAME*).

Sam Steingold ( on Ubuntu 12.04 (precise) X 11.0.11103000
He who laughs last did not get the joke.


Andrew Pennebaker