可能重複:
Timeout a command in bash without unnecessary delay如何在bash腳本中超時?
原來這就是我想要做的事 -
for test in `ls Tests`; do
for file in `ls FileFolder`; do
output=`python devcap $test $file`
echo $test $file $output >>result.txt
done
done
如何超時的$輸出,如果它需要比說長5秒鐘,並移動到下一個$文件?
我可以將stderr重定向到result.txt嗎?
http://stackoverflow.com/questions/687948/timeout-a-command-in-bash-without-unnecessary-delay – doublesharp