I'm on a linux machine and what I need is a sh script/command to be able to remove all contents from a terminal window (even what appears as the contents of PS1 variable) and remove the ability to scroll.
Basically I need a blank terminal where you just see a program's output and you have no ability to scroll. Just like what nano
command does.
I tried various methods, like clear
, reset
, tput reset
and echo -en \\ec
but all of them (although clearing almost all the content) leaves the prompt text intact, which I don't want. I also need not be able to scroll up or down in the terminal.
A solution could be to print some newline characters which amounts to the height of the terminal, but that way I could scroll up and eventually I'd see the prompt text, so this in combination with disabling scrolling/scrollbar could be a solution, but I don't know how to do it, and even then, I don't see this as a 'clean' solution.
Thanks.
reset ; sleep 5 ; echo almost empty screen ; sleep 5
? – Stephen Rauch Jul 09 '17 at 14:54