help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alias-like function?


From: Avraham Rosenberg
Subject: Re: alias-like function?
Date: Thu, 15 Jan 2004 08:53:52 +0200 (IST)

I read your mail and thought: what I nice trick.
But when I tried it, octave refused to behave. It complained instead of
"octlc undefined near line 4 column 1"
octave 2.1.50 on debian 3.0r1
1028~> EXEC_PATH
EXEC_PATH =
/home/avraham/matcompat/bin::/home/avraham/scripts:/usr/local/MuPaD_200/share/bin:/home/avraham/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games

The script octlc -a copy of the one you posted is in 
/home/avraham/matcompat/bin and it is executable.
Moreover, while the binary files in the path are recognized by octave,
it balks at all my scripts (starting with the magic #!/bin/sh
sequence).
Any suggestions ?
Thanks, Avraham

 On Wed, 14 Jan 2004, Geraint Paul Bevan wrote:

> Date: Wed, 14 Jan 2004 22:13:34 +0000
> From: Geraint Paul Bevan <address@hidden>
> To: "[ISO-8859-1] S?ren Hauberg" <address@hidden>
> Cc: help-octave <address@hidden>
> Subject: Re: alias-like function?
> Resent-Date: Wed, 14 Jan 2004 16:06:13 -0600
> Resent-From: address@hidden
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> S?ren Hauberg wrote:
> | Hi all,
> | I'm using octave 2.1.50 on linux.
> | I'm looking for something like the shell command "alias" for octave. I
> | would like to have color output when typing ls. I can achive this by
> | typing "ls --color" but I don't want to do this all the time. I could
> | define a function
> | function ls_tmp(), ls --color, end;
> | but then I wouldn't be able to type "ls" I would have to type "ls_tmp"
> | (or what ever the function would be called).
> | So is there an alias-like command for octave?
> |
> | Soren
> |
> 
> I don't think is possible to overload builtin functions in Octave.
> However, there is a very ugly workaround you could use. If you look at
> "help ls" in Octave, it tells you that "ls" uses the system command.
> Therefore you can use a script to call the real 'ls' with whatever
> options you want.
> 
> /usr/local/bin/ls:
> #! /bin/sh
> exec /bin/ls --color
> 
> Remember to make the script executable (chmod +x /usr/local/bin/ls)
> 
> 
> - --
> Geraint Bevan
> http://homepage.ntlworld.com/geraint.bevan
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (GNU/Linux)
> 
> iEYEARECAAYFAkAFvw0ACgkQcXV3N50QmNMX0wCcCgaP3UNTjYc9Jwe5hAHHd/pr
> y6cAn1xEzV7op2piiTKDuG6J2CD8T+44
> =eraN
> -----END PGP SIGNATURE-----
> 
> 
> 
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
> 
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------
> 
> 




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]