I cannot find it anywhere, tried adding –silence, –quiet etc, but still the script prints everything on stdout as if it was the interactive mode.
I am running octave script with:
octave script.m
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re on a Linux or Mac OS X machine, you could try to use the standard shell constructs to solve your problem:
will gobble everything on the standard output from your script.
edit
If CPU is your concern, the code you have is either badly written and would benefit from a rewrite (by adding at least semicolons after each statement) or you could try a dirty workaround.
What I’d try in that case, is shadowing the
displayfunction by a function that takes a single argument and doesn’t do anything. If you place that function in your working directory, much output should already disappear. If that’s not the case, the code might be usingfprintfto output to the console and you could try shadowing that function. But beware thatfprintfis also commonly used to write to files and has a more complex syntax to overload properly.It’s not the nicest thing to do, but it might yield faster results (and lots of troubles during debugging).