Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Aug 1998 14:48:34 -0400
From:      Roman Katsnelson <romank@graphnet.com>
To:        "q's" <freebsd-questions@FreeBSD.ORG>
Subject:   "clear" curiosity
Message-ID:  <35DDC102.CE22AD57@graphnet.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35DDC102.CE22AD57>