Reputation: 371
I'm trying to run a bash
script from cmd
. When I execute the script a new terminal is opened an immediately closed since there is some problem with it. Because its happening so fast I can't read the problem. I'm looking for a way to keep the terminal open once the script exits.
Upvotes: 7
Views: 20862
Reputation: 2913
You can also put a $SHELL
in a new line at the end of your script. The window will stay open, no matter from where you open your shell script (e.g. cmd / powershell / etc).
Upvotes: 4
Reputation: 479
to test a .sh script in windows cmd (assuming you have bash installed and in your path environment variable): cd into parent directory, type "bash" to enter bash console, type "./", type "exit" to exit bash console
Upvotes: 0
Reputation: 207465
Go horribly Windows-y with this:
read -p "Press any key to continue" x
Upvotes: 10