0
我正在使用bash脚本来自动化一些其他代码的测试。该脚本是这样的:重定向测试输出
for i in $(seq 1 10)
do
cd ~/BuildBot
rm -rf program # Remove the directory each time to test installation
git clone /localrepo/
cd ~/into/program
python2.6 setup.py build_ext -i
cd tests
python runtest.py >& ~/into/reptest/runtest-all.out.$i
echo $? > ~/into/reptest/runtest-all.exit.$i
done
当这样运行,脚本我想要做什么 - 我展示文本的一堵墙,并将其保存在目录reptest文件。现在我已经测试了安装,现在不得不等待整个程序重新安装。然而,当我将脚本降低到
for i in $(seq 1 10)
do
cd ~/into/program/tests
python runtest.py >& ~/into/reptest/runtest-all.out.$i
echo $? > ~/into/reptest/runtest-all.exit.$i
done
脚本挂起,没有任何反应,shell在空白行等待,直到我按Ctrl-C它。输出会发生什么?我如何找回我的文字墙?
你没有发生过使用windows/Cygwin并错误地切换到\ r \ n行结尾? – Boldewyn 2009-06-30 15:00:00