[Discuss] Bash Script WIth Octave

pw p.willis at telus.net
Thu Aug 18 16:44:35 PDT 2016


On 16-08-18 10:45 AM, Andrew M. B. Boktor wrote:
 > Yes there is, lookup the manual for octave command
 >

Thanks. That made the gears turn.

What is 'octave-interpreter-name'? Is that the full path or just the 
command?

The example given is:

#! octave-interpreter-name -qf

...the script...

The GUI doesn't stay open after execution is the only problem....

So, my previous code should be something like:


#! /usr/bin/octave -qf
a=[
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1;
1,1,1,1,0,0,0,0,0,0,0,1,0,1,0,1,0,1,1,1,0,1,1,0,1,1,0,0,0,0,1,1,0,1,0,0,0,0,0,0,0,1,1,1,1;
1,1,1,1,0,1,1,1,1,1,0,1,0,0,0,0,1,1,1,1,0,0,0,1,0,1,1,1,0,1,1,0,1,1,0,1,1,1,1,1,0,1,1,1,1;
1,1,1,1,0,1,0,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,0,1,1,0,0,1,0,1,1,1,1,1,0,1,0,0,0,1,0,1,1,1,1;
1,1,1,1,0,1,0,0,0,1,0,1,1,0,1,0,0,0,0,0,0,0,1,1,0,0,0,1,0,0,1,0,1,1,0,1,0,0,0,1,0,1,1,1,1;
1,1,1,1,0,1,0,0,0,1,0,1,1,0,0,0,0,1,0,0,1,0,1,0,0,0,1,0,1,1,0,1,1,1,0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