How to invoke octave script in unix shell
问题 I have written an octave script file (.m) If anyone could point me out on how to run octave scripts on unix shell that would be really helpful. I do not want to execute the script by invoking octave program. I am new to unix and octave. Thanks in advance 回答1: Yes, of course you can write an Octave program. Like so: $ cat octave_program #!/usr/bin/env octave ## Never forget your licence at the top of the files. 1; function [rv] = main (argv) disp ("hello world"); rv = 0; return; endfunction