Re: Clear screan question
On Fri, Jan 26, 2001 at 05:03:49PM -0600, wes schreiner <wes@infosink.com> wrote:
> Tom Breza wrote:
> >
> > Hi
> >
> > I just use fetch and I been editing filie fetchmail, after I finish
> > editing file I log off from by presing CTRL-D but above log prompt I can
> > read what was been done before, is any chance to clear screan complitly
> > when I log off? That when I press SHIFT-PgUp nobody can see anything?
>
>
> Most shells have a file they will run at logout. For bash this is
> ~/.bash_logout. In my ~/.bash_logout I have:
>
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> clear
>
>
> The idea is to have enough Control-L's to clear out the scroll-back
> buffer and the clear is there so that the next login happens at the top
> of the screen. Works like a charm.
Doesn't seem to work for me. It just prints out the '^L's. I replaced
it with:
echo -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
echo -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
echo -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
echo -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
echo -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
echo -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
clear
which works just fine. Notice that this is also one echo shorter which
is sufficient on my potato install and saves a little time.
It's still got a hackish feel about it however. Anyone know if there's
a cleaner way to do this?
Tim
--
Tim van Erven
tripudium@chello.nl
talerven@wins.uva.nl
Reply to: