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.shThat 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 gitbash
However, 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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login