[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Get Octave meta info with executable script with #! /// -qf
From: |
Ben Abbott |
Subject: |
Re: Get Octave meta info with executable script with #! /// -qf |
Date: |
Sun, 22 Jun 2014 20:15:23 -0400 |
On Jun 22, 2014, at 7:15 PM, rmt1 <address@hidden> wrote:
> Hellos.
>
> On a Mac. My shellscript calls a makemap.m with arguments by:
> octave --persist makemap.m $core $increment $place $latitude $longitude
>
> Then in makemap.m I do the executable Octave script with first line:
> #!/opt/local/bin/octave -qf
>
> This webpage seems to say that not all Nix platforms will interpret the
> "-qf" option the same way:
> https://www.gnu.org/software/octave/doc/interpreter/Executable-Octave-Programs.html#Executable-Octave-Programs
>
> My "symptom" is that when my script runs, I get all the headers of an
> executing Octave script, as if I was on the Octave command line, whereas I
> understand that the -qf tells the bash script to hide all that, so that the
> user doesn't observe that it's an Octave script executing to produce the
> output (which is through Aqua).
>
> SO. Is that just how it is on a Mac - you have to watch all the Octave
> headers as it executes?
>
> Thanks!
The "-qf" aren't shell script options. They are options for Octave.
If your script begins with ...
#!/opt/local/bin/octave -qf
... and it is marked executable, then it can be run by typing the name of the
script a your shell's command line.
If you type ...
octave --persist makemap.m $core $increment $place $latitude $longitude
... at your shell's command line, the "#!/opt/local/bin/octave -qf" isn't
relevant. If you'd like octave to be quiet and not run the rc file, then try
....
octave -q -f --persist makemap.m $core $increment $place $latitude
$longitude
Ben