[Openmcl-devel] How to use lisp program in unix pipeline

Frank Sonnemans openmcl at sonnemans.net
Mon May 12 04:09:31 PDT 2003


Hello all,

I wrote a small lisp application which takes an xml file, filters it and
writes a html file. What I now want to do is use this lisp application in
several ways:

Myfilter infile outfile

Or

Myfilter < infile > outfile

Or

Cat infile | Myfilter > outfile

How do I do this with openmcl. As the startup time of openmcl is very short
I would basically like to use it to replace my unreadable perl scripts.

So far I got some results using a construct like:

Cat Myfilter.lisp | openmcl -b

Problem is that openmcl outputs it's welcome message and prompt before the
output of my lisp program (see bottom of this message for example). This is
unsuitable for the type of use I have in mind. Can I suppress the prompt and
welcome message?

Secondly how do I access the command line parameters from my lisp program?

Regards,


Frank

Example command line session showing openmcl printing prompt:

[Frank-Sonnemanss-Computer:~] frank% cat test.lisp
(print "hello world")
[Frank-Sonnemanss-Computer:~] frank% cat test.lisp | openmcl -b
Welcome to OpenMCL Version (Beta: Darwin) 0.13.4!
? 
"hello world" 
"hello world"


_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel



More information about the Openmcl-devel mailing list