在我的shell脚本中,输出需要3-4分钟。我想展示一些等待消息,直到那个时候像wait for output....
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