Mail Archives: cygwin/1997/07/02/03:14:46
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 <stdio.h>
> int main () { printf("033[2J"); }
Here is an example that will work ( use 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 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 <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 ^[[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 <stdio.h>
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/
-/-' /___/_<_</_</_ 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" with one line of text: "help".
------=_NextPart_000_01BC868F.0DC52340
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML 3.2//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<HTML><META content=3D'"Trident 4.71.0544.0"' name=3DGENERATOR>
</HEAD>
<BODY>
<P><FONT face=3DArial size=3D2><FONT size=3D2>Hello, =
$Bill:</FONT></FONT>
<P><FONT face=3DArial size=3D2><FONT size=3D2>Sorry to say this: the =
second way you=20
mentioned does not work:</FONT></FONT>
<P><FONT face=3DArial size=3D2><FONT size=3D2>> 2) compile this into =
clear.exe or=20
cls.exe:</FONT></FONT><FONT face=3DArial size=3D2><FONT size=3D2><BR>
> #include =
<stdio.h><BR>
> int main () {=20
printf("033[2J"); }<BR>
<BR>
</FONT></FONT>
<P><FONT face=3DArial size=3D2><FONT size=3D2>Here is an example that =
will work ( use=20
g++ -o cls cls.cpp ):</FONT></FONT>
<P><FONT face=3DArial size=3D2><FONT size=3D2>[cls.cpp]</FONT></FONT>
<P><FONT face=3DArial size=3D2><FONT size=3D2></FONT></FONT><FONT =
face=3DArial=20
size=3D2><FONT size=3D2>#include <iostream.h><BR>
<BR>
int main () {<BR>
char a =3D 27u;<BR>
cout << a << "[2J";<BR>
return 0;<BR>
}</FONT></FONT>
<P><FONT face=3DArial size=3D2><FONT size=3D2>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.</FONT></FONT>
<P><FONT face=3DArial size=3D2><FONT size=3D2>Sincerely,<BR>
Wei Ku<BR>
<BR>
***************************************<BR>
Department of Physics and Astronomy<BR>
The University of Tennessee<BR>
1408 Circle Drive<BR>
Knoxville, Tennessee 37996-1200<BR>
<A =
href=3D"mailto:weiku AT utkux DOT utcc DOT utk DOT edu">weiku AT utkux DOT utcc DOT utk DOT edu</A><BR>=
---------------------------------------<BR>
Solid State Division<BR>
Oak Ridge National Laboratory<BR>
P.O.Box 2008<BR>
Oak Ridge, TN 37831-6032<BR>
Phone: (423) 574-5795<BR>
Fax: (423) 574-4143<BR>
<A =
href=3D"mailto:weiku AT solid DOT ssd DOT ornl DOT gov">weiku AT solid DOT ssd DOT ornl DOT gov</A><BR>=
***************************************<BR>
</FONT>
<P></P>
----<BR>
<B>From: </B>$Bill Luebkert <dbe AT wgn DOT net><BR>
<B>To: </B>john DOT cooper AT digitivity DOT com<BR>
<B>Cc: </B>GNU-Win32 AT cygnus DOT com<BR>
<B>Date: </B>Tuesday, July 01, 1997 6:47 PM<BR>
<B>Subject: </B>Re: clear screen?<BR>
<BR>
<HTML><BODY><FONT size=3D2>John Cooper wrote:<BR>
><BR>
> Is there a command to clear the screen when using bash?<BR>
><BR>
> `type clear' and `type cls' reveal nothing.<BR>
<BR>
Here's three things you can try:<BR>
<BR>
1) alias cls=3D'echo -n=20
^[[2J' =
# the=20
^[ is an esc (in vi I use ^V followed by<BR>
&=
nbsp; &n=
bsp; &nb=
sp; =20
# ^[ where ^ is holding down the cntrl key)<BR>
<BR>
2) compile this into clear.exe or cls.exe:<BR>
<BR>
#include <stdio.h><BR>
int main () {=20
printf("033[2J"); }<BR>
<BR>
3) alias cls=3D'cat ~/.cls'<BR>
where .cls contains just =
these 4=20
chars with no \n or spaces (ESC [ 2 J)<BR>
<BR>
HTH,<BR>
--<BR>
,-/- __ _ =20
_ $Bill Luebkert<BR>
(_/ / ) //=20
// DBE Collectibles<BR>
/ ) /--< o // // <A=20
href=3D"http://www.wgn.net/~dbe/">http://www.wgn.net/~dbe/</A><BR>
-/-' /___/_<_</_</_ Email: <A=20
href=3D"mailto:dbe AT wgn DOT net">dbe AT wgn DOT net</A><BR>
-<BR>
For help on using this list (especially unsubscribing), send a message =
to<BR>
"<A=20
href=3D"mailto:gnu-win32-request AT cygnus DOT com">gnu-win32-request AT cygnus DOT com=
</A>"=20
with one line of text: "help".<BR>
</FONT></FONT>
</BODY></HTML>
------=_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".
- Raw text -