help-octave
[Top][All Lists]
Advanced

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

system(), shell, & stderr.


From: niles
Subject: system(), shell, & stderr.
Date: Sat, 26 Aug 95 12:16:08 -0400

I want to issue a system command in octave and re-direct stderr.

Problem: Different shells have different syntax for stderr redirection.
e.g. (ba)sh --> 'ls 2> /dev/null'
     (t)csh --> 'ls >& /dev/null'

I have no control over which shell "system(cmd)" executes cmd in.
It is whatever login shell the user has.

Perhaps, an optional argument could be added to "system" to set 
the shell, or some global variable. (SHELL)

Also, perhaps system should have a mech. for trapping stderr,
like it already does for stdout.

Without, reducing to a two-line shell script I can't see a way
to redirect stderr shell-independently.

If there's a way to redirect stderr with the current octave, please
someone enlighten me. :)

        Thanks,
        Rick Niles.


reply via email to

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