开发者

How do I update existing STDOUT?

开发者 https://www.devze.com 2023-01-28 08:46 出处:网络
I need to print a bunch 开发者_JAVA百科of strings to STDOUT. Instead of each string going on a newline, though, I want to have just one line that gets updated with each new string.

I need to print a bunch 开发者_JAVA百科of strings to STDOUT. Instead of each string going on a newline, though, I want to have just one line that gets updated with each new string.

Any ideas?


echo -n foo
echo -n bar
echo -n baz
echo quux

echo -n 55555
echo -ne '\r'4444
echo -ne '\r'333
echo -ne '\r'22
echo -e '\r'1
0

精彩评论

暂无评论...
验证码 换一张
取 消