[SunHELP] stty erase

Ousmanov (Zarif) sunhelp at sunhelp.org
Wed Mar 28 18:05:08 CST 2001


Yep, I got it.   And here's how I used to do that:

    DISPLAY=`who -m | sed 's/^.*(//' | sed 's/).*$//'`:0.0


thanks,
zarif



----- Original Message -----
From: "Brian Hechinger" <wonko at entropy.tmok.com>
To: <sunhelp at sunhelp.org>
Sent: Wednesday, March 28, 2001 6:17 PM
Subject: Re: [SunHELP] stty erase


> i don't trust REMOTEHOST since it isn't always set, but here is something
> quick off the top of my head that may work.
>
> TTY=`tty | cut -c 6-`
> who | grep $TTY | awk 'BEGIN { FS="(" } {print $2}' | cut -d . -f 1
>
> and then just compare the output of the second line with a list of hosts
and
> set the erase correctly using case or ifs or whatever you want, the rest
is an
> excercise left to the reader.  this works for both telnet and ssh.
>
> if someone can clean this up, i'm new to awk, so this is my best shot real
> quick.
>
> cheers,
>
> -brian
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
>




More information about the SunHELP mailing list