[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: retaining interpreter when running script from command line
From: |
Andy Adler |
Subject: |
Re: retaining interpreter when running script from command line |
Date: |
Fri, 4 Mar 2005 06:52:32 -0500 (EST) |
On Thu, 3 Mar 2005, John W. Eaton wrote:
> How about the attached changes? With them, you do things like
>
> octave --eval CODE # eval CODE, exit
> octave --persist --eval CODE # eval CODE, go interactive
> octave doit.m # eval file, exit
> octave --persist doit.m # eval file, go interactive
> octave --eval CODE doit.m # eval CODE, file, exit
> octave --persist --eval CODE doit.m # eval CODE, file, go interactive
I really like this. It makes octave really flexible. From a
"marketing" perspective, these features are unavailable in the
competing brand, because the license verification times make this
kind of invocation take too long.
> Finally, should we also warn about using more than one --eval option?
> Currently, only the last one will be evaluated and no warning will be
> issued.
Perl will concatenate the strings (adding whitespace) before evaluation
$ perl -e'print 2+' -e'2'
4
Could octave do this? Would it make sense?
--
Andy Adler