help-octave
[Top][All Lists]
Advanced

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

Executable octave program


From: François PH Lapointe
Subject: Executable octave program
Date: Thu, 21 Mar 2019 10:50:58 -0400

Good day everyone,

Base on the link
 https://octave.org/doc/v4.0.1/Executable-Octave-Programs.html#Executable-Octave-Programs,
we could run an executable octave program directly from Unix command line. It should run the program in octave and then exit, right?! It should be similar to the example as 
#! octave-interpreter-name -q -f # comment
for which we are replacing 'octave-interpreter-name'  by '/usr/local/bin/octave’ . However, it does not work, or even with 

$ octave --exec-path /home/flapo/src/pism-dev4/aew4/Ref_runs/m2.m

with m2.m as an executable file similar to
#! octave-interpreter-name -qf
# a sample Octave program
printf ("Hello, world!\n");
Basically, I intend to use a huge bash script, mainly in ‘awk’, with one line for executing an octave program, exit octave, and then continuing through the bash script, all automatically. Am I using the right command script or it should be something different? 

Thank you very much for your help…

François PH Lapointe

reply via email to

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