I'm using a bash script to automate a set of tests for some other code. The script looks like this:
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
When run like this, the script does what I want - shows me a Wall of Text, and saves it to a file in the directory reptest. Now that I've tested installation, it's getting annoying to have to wait for the whole program to reinstall. However, when I cut the script down to
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
The script hangs, nothing happens, the shell waits on a blank line until I Ctrl-C it. What happens to the output? How do I get back my Wall of Text?