interactivity with the glory shell

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

interactivity with the glory shell

Daniel Heiserer
Hi,
a few months ago, when I started working with octave rather than matlab
I asked for a shell escape sequenz "!". The answer was that octave has a
"system" command and the "!" is the negation operator.

Unfortunately i have hundres of #.m files using the "!" as a shell
escape.
And I think others have too. The other thing is that I have to work with
BOTH systems: matlab AND octave.


My suggestion would be:

1) As I cannot imagine, hwy anybody should use the "!" as the 1st
character in a string to be evalutaed, either on the commandline/script
nor with the eval("!foo") octave could use it as the shell escape and
get more matlab compability. If the "!" is not the 1st character use it
as the negation character.

2) It would be nice to get the answer of the shell using the ``
(backquotes). This is much shorter than the system command.

I know that the system command of octave has the power to do all that
stuff. But why not adding a few more nice features, even if the provide
much more matlab-script functionlaity.




Bye daniel


Reply | Threaded
Open this post in threaded view
|

interactivity with the glory shell

John W. Eaton-6
On 28-Aug-1998, Daniel Heiserer <[hidden email]> wrote:

| 1) As I cannot imagine, hwy anybody should use the "!" as the 1st
| character in a string to be evalutaed, either on the commandline/script
| nor with the eval("!foo") octave could use it as the shell escape and
| get more matlab compability. If the "!" is not the 1st character use it
| as the negation character.

I can imagine that someone would type something like `! x' at the
command line to see what the result would be.  It would be confusing
if that suddenly tried to execute the shell command `x' instead of
negating the value in the variable x.

| 2) It would be nice to get the answer of the shell using the ``
| (backquotes). This is much shorter than the system command.

Perhaps.  At least the backquotes are not currently used for anything
else, so it seems much more possible to implement without breaking
anything.

| I know that the system command of octave has the power to do all that
| stuff. But why not adding a few more nice features, even if the provide
| much more matlab-script functionlaity.

Lack of time?  It seems that the capability is already there.
Wouldn't it make more sense to work to implement things that Octave
cannot do, rather than spend time working on adding syntactic sugar
(particularly when it would introduce some ambiguity)?

My priorities could probably be influenced by sufficient funding,
however.  :-)  Otherwise, perhaps someone else has the time and interest
to implement these features (the first *must* be optional, and not
turned on by default. If the changes are clean and relative to the
2.1.x sources, I'll consider merging them in.

Thanks,

jwe