I am using a bash file to automate a process that I do in the terminal. Part of it is calling a function ~/Executables/postprocessor
that asks for an input MyFileName
. In the terminal, I do it like this, and works fine:
[user SimulationFolder]$ ~/Executables/postprocessor
Project name = first part of filenames >
MyFileName
When I put it in bash like:
#!/bin/bash
source ~/bin/activate_enviroment.sh
~/Executables/postprocessor
MyFileName
I get the error MyFileName: command not found
, so MyFileName
is interpreted as a bash command instead of the input for the function.
How do I make the bash introduce this input? (note that this is NOT a USER input, I know the value every time, and should be done directly from the bash)
I also tried
#!/bin/bash
source ~/bin/activate_enviroment.sh
~/Executables/postprocessor MyFileName
And the postprocessor simply didn't run because it didn't receive an input