【发布时间】:2022-01-25 05:45:55
【问题描述】:
printf "line one\n"
printf "line two\n"
在这些打印输出之后,我想替换 第一行 并打印其他内容
(不使用clear)。我试过这样的命令:
printf "line one\n"
printf "line two\r"
这不是我想要的,因为它替换了最后一行 line two,而不是 line one。
我想做什么:
printf "line one\n"
printf "line two\n"
sleep 0.5
somecode "line three"
我想要的输出:
line three
line two
【问题讨论】:
标签: linux bash shell printf echo