[SunHELP] stty erase

Dale Ghent sunhelp at sunhelp.org
Tue Mar 27 22:56:49 CST 2001


On Tue, 27 Mar 2001, Brian Hechinger wrote:

| > | Is there any way to determine a type of a machine I'm coming from (to put
| > | some "if - else" statement into .profile)?
| > | Or is there better solution?
| >
| > TYPE = `uname -s`
| > if [ "$TYPE" = "Linux" ]; then
| >    stty erase ^?
| > else
| >    stty erase ^H
| > fi
| 
| how does this work?  i don't think it does.  this works if they were sharing
| a home directory via NFS, but that's not what the question is about.  he needs
| to know where his user is telnetting from.
| 
| i don't have a solution off hand, but i'll think about it, that's a tricky one.

Ah, I misread his question. I thought he asked "how can I tell which
machine I'm on, and set erase accordingly"

well, there's no apparent way to guess which OS you're coming from, from
the remote shell's perspective.

unless you want to keep a list of remote IPs and their OS types in your
.profile and match the REMOTEHOST variable to them and set
accordingly. But REMOTEHOST isnt always set... depends on shell and
service type (telnet, ssh)...

/dale




More information about the SunHELP mailing list