Suppressing echo inside scripts

Gabriel Popescu popescu at alcatel-lucent.com
Wed Dec 5 07:13:44 CST 2007


Great!

Thanks to all for the trick.

Gabriel

*********** REPLY SEPARATOR  ***********

On 2007/12/05 at 13:05 c. wrote:

RE>>On 05/dic/07, at 11:15, Gabriel Popescu wrote:
RE>>
RE>>>
RE>>> Hi all.
RE>>>
RE>>> I'm an Octave beginner and I have an easy question:
RE>>> using Octave as a command interpreter, e.g. using "#!/usr/bin/ 
RE>>> octave" in a
RE>>> script,
RE>>> I get lot of echoes; each code line generates a terminal output.
RE>>>
RE>>> The statement
RE>>>
RE>>> octave:1>varname=1
RE>>>
RE>>> shows on screen
RE>>>
RE>>> varname = 1
RE>>> octave:2>
RE>>>
RE>>> Is possible to suppress such automatic echo, leaving only output  
RE>>> generated
RE>>> by printf command (or similar commands)?
RE>>>
RE>>> Thanks,
RE>>> Gabriel
RE>>
RE>>If you don't want to see the result of each command you have to  
RE>>terminate the line with a ";"
RE>>to turn off the initial message printed by octave use the -q option
RE>>
RE>>#!/usr/bin/octave -q
RE>>varname = 1;
RE>>printf ("the value of varname is: %g\n",varname)
RE>>c.





More information about the Help-octave mailing list