FAQ: Difference between revisions

Jump to navigation Jump to search
8 bytes added ,  16 November 2012
Line 390: Line 390:
   octave> run("/opt/local/foo.m")
   octave> run("/opt/local/foo.m")


An alternative is to run the script from outside Octave by calling Octave from your operating system shell. Unlike calling the script from inside Octave, this also allows you to pass arguments from the shell into the script, which the script can access using the <code>argv</code>:
An alternative is to run the script from outside Octave by calling Octave from your operating system shell. Unlike calling the script from inside Octave, this also allows you to pass arguments from the shell into the script, which the script can access using the <code>argv</code> command:


   $ octave the-script.m arg1 arg2
   $ octave the-script.m arg1 arg2

Navigation menu