I try to reproduce your problem but it was not possible. I did this test files oct.txt
x = -10:.1:10; y = sin(x).*exp(-abs(x)); plot(x,y)
and go.sh
(and I make it executable with chmod u+x go.sh
)
#!/bin/bash octave -q --persist oct.txt # It calls the octave and remain as interactive echo " Now we continue " # Here the script continue when you exit from octave sleep 5 # Do some stuffs exit # It exits
When I run it with ./go.sh
it starts octave
and when I exit it continues with the script.
When I add pause()
or pause(10)
to the bottom of oct.txt
and I call octave with the command octave -q oct.txt &
it behaves as supposed:
- the script starts octave in background and continues
- eventually the script ends leaving alive the octave windows
Unfortunately the windows of octave is frozen from the pause
command and not so useful.
- GNU bash, version 4.3.11
- GNU Octave, version 3.8.1