On Sat, Jan 27, 2001 at 07:37:59AM -0600, wes schreiner wrote: > > # ~/.bash_logout: executed by bash(1) when login shell exits. > # when leaving the console clear the screen to increase privacy > case "`tty`" in > /dev/tty[0-9]) echo ^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L\ > ^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L\ > ^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L\ > ^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L\ > ^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L\ > ^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L\ > ^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L^L > clear > > Those ^L are real control-L's, not shift-6, shift-L. I'd still like to > see a cleaner way to clear the CONSOLE scroll-back. All of the > suggestions so far (clear, reset -Q, ESC[2J ESC[0;0H in /etc/issue) just > clear the immediately visible screen, not the console scroll-back. how about: case "$(tty)" in /dev/tty[0-9]) t=$(v=`tty` ; echo ${v##*ty}) clear chvt 63; chvt "$t" ;; *) ;; esac -- Ethan Benson http://www.alaska.net/~erbenson/
Attachment:
pgpcEYP3pD6Jy.pgp
Description: PGP signature