无法在Windows10上使用Git Bash界面运行shell脚本 [英] Cant run shell script using Git Bash interface on Windows10
问题描述
遵循
我可以看到bash程序的即时外观,但无法捕捉文本进去。
我双重检查了路径,他们是正确的。
我通过Git bash运行脚本,一切正常(信息出现)。
任何想法?
我只看到消息:
startgit-bash。 exe -i -l -c/C/path/to/script.sh
code> script.sh ,包括暂停:
echo你好。世界!
read -n1 -r -p按任意键继续...键
OP Hairi 报告 Following this post I wasn't able run shell trough Git bash.
This is the batch file : This is the shell script: And this is what I get when batch is run: I can see the instantaneous appearance of the bash program, but can't catch the text into it.
I double-triple-checked the paths, they are correct.
I ran the script trough the Git bash, everything worked well (the message appeared). Any ideas? I have seen a different syntax before. I only see the message with: With The OP Hairi report in the comments making it work with:
这篇关于无法在Windows10上使用Git Bash界面运行shell脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! >
start / b cmd / cC:/ Program Files / Git / git-bash.exe/C/path/to/script.sh
%ComSpec% /c ""C:\Program Files\Git\git-bash.exe" --login -i -- C:\Users\rmrd001\Documents\Git\scripts\first\test.sh"
pause
echo Hello, World!
start "" git-bash.exe -i -l -c "/C/path/to/script.sh"
script.sh
including a pause:echo Hello. World!
read -n1 -r -p "Press any key to continue..." key
start /b cmd /c "C:/Program Files/Git/git-bash.exe" /C/path/to/script.sh