I want to do a clear but only of the last command I executed. Here is a example so you can understand it better:
root@debian:~# id
uid=0(root) gid=0(root) groups=0(root)
root@debian:~# uname -a
Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux
root@debian:~#
If that's the current state of the shell I want to execute a command (for example echo a > /tmp/foo
) and keep the console:
root@debian:~# id
uid=0(root) gid=0(root) groups=0(root)
root@debian:~# uname -a
Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux
root@debian:~#
So it should be something like echo a > /tmp/foo && clear -n 1
(I know clear does not have that -n 1 functionality it's just an example).
Thank you