Hi Karim, hi everybody. I’m struggling with a problem and I cannot find a solution.
I’m trying to send a simple command to the MacOs terminal through om-shell (which usually works like charm, but not in this specific case). The command a simple “source filename.sh” and the .sh file contains a set of actions (initialisation of a anaconda environment, python, csound and so on). If I copy and paste the same exact string with whom I’m feeding om-shell everything works perfectly. Through om-shell it doesn’t (some commands can’t be found). This doesn’t make any sense.
I tried already with sys:call-system-showing-output changing the shell-type to bash but it doesn’t work.
Any idea ? Best. M.
Dear Mauro,
First try instead om-terminal. It has also an extra key for shell environment.
Did you also check if your .sh file is executable? If not this also may return an error.
Can your .sh file (simplified if possible)?
Best
K
here’s the file :
01-Strings_D-KyrieGloria_E-10.sh (5.8 KB)
(cannot really simplify it, sorry) … and yes I tried changing the shell environment, but it’s just bin/bash, nothing fancy
Dear Mauro,
One practical way is to put your .sh file in the in-files (or out-files folder).
Assuming that your file is named toto,sh
First start your script with:
#!/bin/sh
…
Second make sure it is executable:
cd “to-your-folder-where-the-script-is”
chmod a+x toto.sh
Then use this patch replacing toto.sh with your script (in the textfile box):
The patch:
omterm.omp (5.1 KB)
Best
K
Dear Karim, thanks a lot for the fast answer. Problem solved. Making the executable was indeed part of the solution, but there were other issues (apparently anaconda isn’t working in a .sh file if the shell is not initialised (whatever that means) before, so you have to run the line “source ~/anaconda3/etc/profile.d/conda.sh” before … ). Greetings from Venice ! M.
Then you can add in your .sh the command at first no?
exactly what I did, it works now ! Cheers. M.