how to execute .sh in disc d
-
hi, create a program in python that runs with the following bash, the bash is located in the same path of the project.
What parameters would I put in the cmd trigger to execute the .sh?
-
@Luisito-Palma, I see you're trying to run a shell script using Git bash.
Please try this as your command:
"c:\Program Files\Git\git-bash.exe" -c /d/learn/script_python/ejecutar.sh
-
@Russ When I run in, the terminal opens and closes automatically without executing the script.
-
@Russ when I run the script from terminal it works normally
-
@Luisito-Palma, please try running this command from a Windows cmd window and send me a screenshot. I'd like to see the error it gives, if any.
"c:\Program Files\Git\git-bash.exe" -c /d/learn/script_python/ejecutar.sh
That command is working for me - it's running my bash script.
-
@Russ
I had to put a sleep because the terminal closes automatically when it shows that error, but when I execute the command that you told me, that Windows terminal opens and not the gitbashHowever, the git bash path is correct
-
@Russ The solution was to put the full path of where the .sh file is located and the script now works, however it continues to be executed in a cmd and not in git bash
-
@Luisito-Palma, nice job. I'm glad you got it figured out.
I think it must be running the bash script in git-bash even though the window shows cmd because you can see the output of the python script your bash script is running.
-
@Russ Yes I think the same, but "if it works it's better not to touch it" hahaha, it's a bug that my future self will see how to solve, thank you very much for the help
-
@Luisito-Palma, makes sense. You're welcome. Your project looks interesting.