From: weiku AT UTKUX1 DOT UTK DOT EDU ("Wei Ku") Subject: Re: clear screen? 2 Jul 1997 03:14:46 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199707020624.CAA16082.cygnus.gnu-win32@solid.ssd.ornl.gov> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01BC868F.0DC52340" X-Mailer: Microsoft Outlook Express 4.71.0544.0 Original-To: X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE Engine V4.71.0544.0 Original-Sender: owner-gnu-win32 AT cygnus DOT com This is a multi-part message in MIME format. ------=_NextPart_000_01BC868F.0DC52340 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, $Bill: Sorry to say this: the second way you mentioned does not work: > 2) compile this into clear.exe or cls.exe: > #include > int main () { printf("033[2J"); } Here is an example that will work ( use g++ -o cls cls.cpp ): [cls.cpp] #include int main () { char a =3D 27u; cout << a << "[2J"; return 0; } And I am sure that you can figure out several ways to do this in pure C = in order to generate a more compact binary executable file. Sincerely, Wei Ku *************************************** Department of Physics and Astronomy The University of Tennessee 1408 Circle Drive Knoxville, Tennessee 37996-1200 weiku AT utkux DOT utcc DOT utk DOT edu --------------------------------------- Solid State Division Oak Ridge National Laboratory P.O.Box 2008 Oak Ridge, TN 37831-6032 Phone: (423) 574-5795 Fax: (423) 574-4143 weiku AT solid DOT ssd DOT ornl DOT gov *************************************** ---- From: $Bill Luebkert To: john DOT cooper AT digitivity DOT com Cc: GNU-Win32 AT cygnus DOT com Date: Tuesday, July 01, 1997 6:47 PM Subject: Re: clear screen? John Cooper wrote: > > Is there a command to clear the screen when using bash? > > `type clear' and `type cls' reveal nothing. Here's three things you can try: 1) alias cls=3D'echo -n ^[[2J' # the ^[ is an esc (in vi I = use ^V followed by # ^[ where ^ is holding down the = cntrl key) 2) compile this into clear.exe or cls.exe: #include int main () { printf("033[2J"); } 3) alias cls=3D'cat ~/.cls' where .cls contains just these 4 chars with no \n or spaces (ESC = [ 2 J) HTH, -- ,-/- __ _ _ $Bill Luebkert (_/ / ) // // DBE Collectibles / ) /--< o // // http://www.wgn.net/~dbe/ -/-' /___/_<_

Hello, = $Bill:

Sorry to say this: the = second way you=20 mentioned does not work:

> 2) compile this into = clear.exe or=20 cls.exe:
>         #include = <stdio.h>
>         int main () {=20 printf("033[2J"); }

Here is an example that = will work ( use=20 g++ -o cls cls.cpp ):

[cls.cpp]

#include <iostream.h>
 
int main () {
char a =3D 27u;
cout << a << "[2J";
return 0;
}

And I am sure that you can = figure out=20 several ways to do this in pure C in order to generate a more compact = binary=20 executable file.

Sincerely,
Wei Ku

***************************************
Department of Physics and Astronomy
The University of Tennessee
1408 Circle Drive
Knoxville, Tennessee 37996-1200
weiku AT utkux DOT utcc DOT utk DOT edu
= ---------------------------------------
Solid State Division
Oak Ridge National Laboratory
P.O.Box 2008
Oak Ridge, TN 37831-6032
Phone: (423) 574-5795
Fax: (423) 574-4143
weiku AT solid DOT ssd DOT ornl DOT gov
= ***************************************

----
From: $Bill Luebkert <dbe AT wgn DOT net>
To: john DOT cooper AT digitivity DOT com
Cc: GNU-Win32 AT cygnus DOT com
Date: Tuesday, July 01, 1997 6:47 PM
Subject: Re: clear screen?

John Cooper wrote:
>
> Is there a command to clear the screen when using bash?
>
> `type clear' and `type cls' reveal nothing.

Here's three things you can try:

1) alias cls=3D'echo -n=20 ^[[2J'            = # the=20 ^[ is an esc (in vi I use ^V followed by
            &= nbsp;           &n= bsp;           &nb= sp;  =20 # ^[ where ^ is holding down the cntrl key)

2) compile this into clear.exe or cls.exe:

        #include <stdio.h>
        int main () {=20 printf("033[2J"); }

3) alias cls=3D'cat ~/.cls'
        where .cls contains just = these 4=20 chars with no \n or spaces (ESC [ 2 J)

HTH,
--
  ,-/-  __      _ =20 _         $Bill Luebkert
(_/   /  )    //=20 //       DBE Collectibles
  / ) /--<  o // //      http://www.wgn.net/~dbe/
-/-' /___/_<_</_</_    Email: dbe AT wgn DOT net
-
For help on using this list (especially unsubscribing), send a message = to
"gnu-win32-request AT cygnus DOT com= "=20 with one line of text: "help".
------=_NextPart_000_01BC868F.0DC52340-- - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".