[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Clear screan question



I know I'm replying to the wrong post, but please forgive me as I wasn't on
the list yet when the post I should reply to was posted.

The reason the ^L's were printed out is most likely that you just typed
^ (the caret key) followed by L. That does not generate the Control+L character
as is desired here, but just prints out the ^ followed by L. In bash, vim,
and probably many other places, the correct way to generate this character
for a purpose such as this is to type Control+V then Control+L. The V stands
for Verbatim; it says that the Control+L shouldn't be interpreted but should
stand as is.

- Jimmy Kaplowitz
jimmy@kaplowitz.org

On Sat, Feb 03, 2001 at 06:47:01PM -0600, wes schreiner wrote:
> "Karl E. Jørgensen" wrote: 
> > On Fri, Jan 26, 2001 at 08:08:07PM -0500, Andy Bastien wrote:
> > > Of all the days, it was on Sat, Jan 27, 2001 at 01:53:31AM +0100 that Tim van Erven quoth:
> > > > 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?
> > > >
> > >
> > > If you have an ANSI terminal, you can put an ESC[2J ESC[0;0H in
> > > /etc/issue.  The color codes also work, BTW.
> > >
> > > VTxxx terminals probably have a similar screen-clearing code, but I
> > > don't know what it is.
> > 
> > Jumping into this thread a bit late, but what about
> > 
> >     tput clear
> >     tput reset
> > 
> > Should be terminal-generic
> 
> Indeed it is, but it only clears the immediately visible screen.  It
> does not clear the console scroll-back buffer, and that's the additional
> behavior we are looking for.
> 
> wes schreiner
> 
> 
> --  
> To UNSUBSCRIBE, email to debian-security-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: