我搭建了我的网页服务器,现在正在进行测试。所以我用bash脚本模拟了许多请求。
这个方法很好,但我更喜欢在终端上将所有的
我已经阅读了这篇文章:如何在同一行显示和更新echo。
i=0
while [ $i -lt 20 ]; do
echo ''
echo ''
echo ''
echo '============== current time ==============='
echo $i
echo '==========================================='
echo ''
curl -i http://www.example.com/index?key=abceefgefwe
i=$((i+1))
done
这个方法很好,但我更喜欢在终端上将所有的
echo
都放在同一个位置。我已经阅读了这篇文章:如何在同一行显示和更新echo。
所以我给echo
添加了-ne
,但它似乎并没有按预期工作。
curl
的消息仍然会推开echo
。
这就是我需要的:
============== current time =============== ---\
1 <------ this number keeps updating ----> the 3 lines stay here
=========================================== ---/
Here is the messages of `curl`, which are showing as normal way
ncurses
库可以实现你想要的功能。 - sid-m