Subject: [clisp-list] Q: getting command line args in CLisp?

From: Mark Watson <[email-masked]>
Date: Tue Apr 16 13:53:06 2002

I wanted to use CLisp for some simple scripting and I need to
grab the command line args when starting CLisp.
I didn't see anything in the docs on how to do this.

Any ideas?

Thanks,
Mark

-- Mark Watson, author and Java consultant
-- www.markwatson.com  -  Open Source and Open Content
-- www.knowledgebooks.com  -  Commercial artificial intelligence software

---

From: [email-masked] (Don Cohen)
Date: Tue Apr 16 14:02:17 2002

> I didn't see anything in the docs on how to do this.

Try this script:

#!/usr/local/bin/clisp
(print ext:*args*)

---

From: "Claudio Bley" <[email-masked]>
Date: Tue Apr 16 14:21:05 2002

>>>>> "Mark" == Mark Watson <[email-masked]> writes:

    Mark> I wanted to use CLisp for some simple scripting and I need
    Mark> to grab the command line args when starting CLisp.  I didn't
    Mark> see anything in the docs on how to do this.

    Mark> Any ideas?

I don't know which version you're using, but when I run 'clisp --help'
(with CLISP 2.28) I get this:

GNU CLISP (http://clisp.cons.org/) is an ANSI Common Lisp.
Usage:  /usr/local/lib/clisp/base/lisp.run [options] [lispfile [argument ...]]
 When `lispfile' is given, it is loaded and `*ARGS*' is set
 to the list of argument strings. Otherwise, an interactive
 read-eval-print loop is entered.
[...]

HTH
Claudio