From owner-freebsd-questions Fri Aug 21 11:42:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA14394 for freebsd-questions-outgoing; Fri, 21 Aug 1998 11:42:46 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from netra.graphnet.com (netra.graphnet.com [192.206.112.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA14368 for ; Fri, 21 Aug 1998 11:42:38 -0700 (PDT) (envelope-from romank@graphnet.com) Received: from graphnet.com (roman.graphnet.com [192.206.112.93]) by netra.graphnet.com (8.8.8/8.8.6) with ESMTP id OAA11276 for ; Fri, 21 Aug 1998 14:41:55 -0400 (EDT) Message-ID: <35DDC102.CE22AD57@graphnet.com> Date: Fri, 21 Aug 1998 14:48:34 -0400 From: Roman Katsnelson Organization: Graphnet, Inc X-Mailer: Mozilla 4.05 [en] (WinNT; U) MIME-Version: 1.0 To: "q's" Subject: "clear" curiosity Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I did 'cat clear' recently, and saw that all it said was exec tput clear I noticed that when I just type that in at the command line, the result is entirely different -- it logs me out, clears the screen and gives a new login prompt. I like this a lot better than the regular "exit" or "Ctrl-D" thing because it clears the screen first. These are my two questions: 1) Why are the results different between the same commands in a shell script and at the command line? and 2) How can I write a shell script that does the same thing? (I tried, but, of course, it did exactly what 'clear' does). Thanks for any ideas, Roman -- Roman Katsnelson Graphnet, Inc. romank@graphnet.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message