delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/01/11:14:08

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: stupid noobquestion(clear)
Date: Tue, 1 Mar 2005 16:13:12 -0000
MIME-Version: 1.0
In-Reply-To: <Pine.GSO.4.61.0503011045440.10998@slinky.cs.nyu.edu>
Message-ID: <SERRANORf6Ci6nx8dyD00000039@SERRANO.CAM.ARTIMI.COM>
X-OriginalArrivalTime: 01 Mar 2005 16:13:14.0045 (UTC) FILETIME=[9211E6D0:01C51E79]

----Original Message----
>From: Igor Pechtchanski
>Sent: 01 March 2005 15:48

> On Tue, 1 Mar 2005, Alexander Thurban wrote:
> 
>> Is there a command for clearing the console?
>> Can't get cls,clr,clear to work :(
> 
> Which terminal?  If the regular CMD window, "clear" works just fine (as
> long as it's installed, see <http://cygwin.com/packages/>).  If you use
> "bash", you can also try pressing Ctrl-L (which is the default mapping to
> readline's "clear-screen" function and can be changed with "bind").
> 
> "cls" is a DOS-ism, and won't work.  

  Well, typing Perl commands or sed scripts at the shell prompt won't work
either, but if you prepend the name of the appropriate command interpreter,
with suitable flags, like this:....

cmd /c cls

it does work.  If you wanna get _really_ portable, you can use COMSPEC, like
this:

`cygpath -u "${COMSPEC}"` /c cls

and then it'll work on 9xMe as well as Nt2kXp

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019