I trying to run a script which invokes a program outside octave. The script works fine when called from terminal. My problem is that the shebang part of the script doesnt seems to invoke bash. For example, if I write the following script:
#! /bin/bash
echo $SHELL
whoami
When I call this script fom octave
system('bash myscript.bash')
I got:
>> /bin/sh
>> user
So when I try to run the actual script from octave (not the one above), I get "command not found" errors. Any idea what im doing wrong here?
Found out the issue was that I installed Octave with flatpack, which creates its own environment or something, hence cant really see the functions in /bin. So if you having similar issues, like not having the same functions in Octave command line and Terminal:
flatpak uninstall octave
sudo apt-get install octave