Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Fun with tset

14 views
Skip to first unread message

Earle R. Horton

unread,
Apr 25, 1987, 2:44:47 PM4/25/87
to
Here's one to make the computer "remember" the last terminal you
were using. You can override at the prompt from tset.

In your ".logout"

unset noclobber
set | sed -n -e '/term/s/ //' -e '/term/s/term//p' > $HOME/.oldterm
echo See you tomorrow $user.

In your ".login"

set OLDTERM = `cat $HOME/.oldterm`
loop:
set noglob; eval `tset -s -Q \?$OLDTERM`
if ($TERM == "unknown") goto loop
set term = $TERM

Barry A. Burke

unread,
Apr 26, 1987, 8:53:27 PM4/26/87
to
In article <60...@dartvax.UUCP> ear...@dartvax.UUCP (Earle R. Horton) writes:
>Here's one to make the computer "remember" the last terminal you
>were using. You can override at the prompt from tset.
.
.
.

>unset noclobber
>set | sed -n -e '/term/s/ //' -e '/term/s/term//p' > $HOME/.oldterm

Silly! Why not:

echo $TERM > $HOME/.oldterm

or

echo $term > $HOME/.oldterm


Methinks a case of someone too addicted to the "Real Hacker's Use {sed, awk,
grep, ... } Guide to Wasting Time" >8*X

--
LIVE: Barry A. Burke, (617) 499-6370
USPS: Adelie Corporation, 125 CambridgePark Drive Cambridge, MA 02140
UUCP: ba...@adelie.Adelie.COM / ..!{harvard,ll-xn,necntc,mirror}!adelie!barry
ARPA: ba...@adelie.Adelie.COM (via MX) / barry%ade...@harvard.Harvard.EDU

0 new messages