-o option in newlisp commandline

Started by newdep, August 12, 2006, 12:13:11 PM

Previous topic - Next topic

newdep

Hi Lutz,



Found some time to fiddle the OS//2 port of newlisp and added an extra function

(not very impressive but usefull for me, especialy in OS/2) to the newlisp commandline.



I added the -o option below







[C:utilsprognlnewlisp-8.9.3]newlisp -h



newLISP v.8.9.3 Copyright (c) 2006 Lutz Mueller. All rights reserved.



usage: newlisp [file ...] [options ...] [file ...]



options:





 -h this help

 -s <stacksize>

 -m <max-mem-megabyte>

 -c suppress prompts

 -l log connections only

 -L log all

 -p <port-number>

 -d <port-number>

 -x <port-number>

 -e <quoted lisp expression>

 -o <quoted lisp expression with no exit>, used in OS/2



for more information see http://newlisp.org">http://newlisp.org











 -o <quoted lisp expression with no exit>, used in OS/2



This does not exit(0) after execution and your are able to stay in the newlisp comsole.



The use is that when not using an init.lsp or want to execute anyting befor newlisp

starts this -o option can be used. I find it very handy to use befor the newlisp starts i.e.

like this ->



c:newlisp -o "(!"mode 154,40")"



0

newLISP v.8.9.3 on OS/2 v4+, execute 'newlisp -h' for more info.



>





perhpas its intresting as a generic command for the newlisp distribution?





Norman.
-- (define? (Cornflakes))

Lutz

#1
You could use the following batch file:


# - newlispOS2
echo $1 > /tmp/junk
newlisp /tmp/junk


and then do:


~> ./newlispOS2 '(setq x 123)'
newLISP v.8.9.3 on OSX UTF-8, execute 'newlisp -h' for more info.

> x
123
>