How to keep same line on terminal top with long ou

2020-04-10 01:09发布

问题:

Under Ubuntu 14.04, I'm writing a script that output a lot of text (several commands...), and I would like to keep one or more lines always on top of the terminal screen to display what's running title. In other words, I try to reduce terminal vertical scroll zone and write in that non-scrolling zone.

How can I do that? I saw similar stuff using a loop catching output line by line, but I'm unable to find a way to tell the system to print from let's say line 2 or 3.

Thanks for your answers,

Nicolas

回答1:

Nic, it appears this does quite nicely.

http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x361.html