在我的shell脚本中输出需要3-4分钟。我希望在此之前显示一些等待消息,如wait for output....
答案 0 :(得分:1)
echo -n "Wait for output.."
script > outputfile &
pid=$!
while ps $pid > /dev/null 2>/dev/null ; do
echo -n .
sleep 10
done
echo .
echo "And here is that output you've been waiting for:"
cat outputfile