Dos shell script running shell script method
In actual development, it is often necessary to run the *.sh shell script through the *.bat file under the Windows operating system. The following will explain the method through a case:
rem this is a dos shell script used to run a shell script
@echo "shell script"
:: the value of variable SHELL_SCRIPT_PATH is the path of python script
:: you need modify the content inside the dobule quotation depending on your demand
@set SHELL_SCRIPT_PATH="C:tool\Get_PS_data_script.sh"
:: shell bin directory
@set SHELL_BIN_DIR="C:\Program Files\Git\bin\bash.exe"
:: run shell script
@%SHELL_BIN_DIR% %SHELL_SCRIPT_PATH%
@echo "dos script run successfully"
@echo ~ ~ ~ ~ ~ ~
@echo * * *
:: cmd command is used to keep reserve at dos windown if you run the bat
@cmd