[Ecls-list] -shell and -load difference

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Tue Oct 16 08:04:27 UTC 2007


2007/10/16, David_Creelman at pa.com.au <David_Creelman at pa.com.au>:
> I'm trying to get standard input processed by a script called by doing :-
>    cat text | ecl -shell processtext
> But this doesn't seem to work.... If I use load, it does work, but it gives
> me all of the ECL startup banner at the beginning which makes it less than
> useful if I want to use it in a Unix shell pipe processing kind of a way.

-shell is exactly -load. The difference is minimal since they are
coded exactly the same way except for a single statement that
instructs ECL not to be verbose and not to quit (see
src/lsp/cmdline.lsp)

If it the script does not work (this is a very imprecise statement)
then one possible cause is that the program has a bug: it causes an
error that makes ECL jump to the toplevel. Can you provide me with an
example of the offending code?

Juanjo

$ cat foo.lsp
(print "Hello")
(terpri)
$ ecl -load foo.lsp
;;; Loading "/Users/jjgarcia/foo.lsp"

"Hello"
ECL (Embeddable Common-Lisp) 0.9i
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.  Top level.
> (quit)
$ ecl -shell foo.lsp

"Hello"


-- 
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list