Is there a possibility to use Octave headless.
Something like this octave < "5+4" >result.txt
octave < "5+4" >result.txt