Article View: gnu.emacs.help
Article #189051Re: `tty`: Ambiguous. -- what does this mean?
From: Christos S. Zoulas
Date: Fri, 10 May 1991 10:39
Date: Fri, 10 May 1991 10:39
45 lines
2503 bytes
2503 bytes
In article <9105100644.AA08709@life.ai.mit.edu> tranle@intellicorp.com writes:
>
>| From: fido!jackr@fido.wpd.sgi.com (John "Jack" Repenning)
>|
>| In article <9105070133.AA01943@life.ai.mit.edu> NDAVIS@INTELLICORP.COM (Nils Davis) writes:
>|
>| I get this "`tty`: Ambiguous" error now and then, ...
>|
>| As I wrote this, I tried an experiment, and set shell-file-name to
>| /bin/sh. Now things work. Is this just a normal brokenness of csh, or
>| is there something else I can do to make it work with csh?
>|
>| Those two together suggest that the problem is somewhere in your
>| ~/.cshrc, perhaps a call to tty or stty. But I don't recognize the
>| "Ambiguous" message, so I don't know quite what the actual problem is.
>|
>
>I have seen that strange message "`tty`: Ambiguous" when you try to use
>`rsh' on an hp machine. The `rsh' is the restricted shell program and
>not the remote shell. The remote shell is `remsh'.
It is not a strange message and csh is documented to behave that way...
The problem is that in your .cshrc you have something that tries to
execute `tty`. If you are not running the shell on a real tty then
tty will print "not a tty". Csh expects one word in some places,
but tty is giving it back 3.
The solution is to add a pair of quotes around `tty` to make it a single
word:
if (`tty` == "/dev/console")
should be changed to:
if ("`tty`" == "/dev/console")
christos
--
Christos Zoulas | 389 Theory Center, Electrical Engineering,
christos@ee.cornell.edu | Cornell University, Ithaca NY 14853.
christos@crnlee.bitnet | Phone: (607) 255 0302, Fax: (607) 255 9072
Technical Details
Message-ID:
<1991May10.103931.17462@batcomputer.tn.cornell.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!caen!sdd.hp.com!cs.utexas.edu!rice!uw-beaver!cornell!batcomputer!theory.tn.cornell.edu!christosReferences:
<JACKR.91May8161341@dblues.dblues.wpd.sgi.com> <9105100644.AA08709@life.ai.mit.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103b8b,ff2306bc30de0977 X-Google-Attributes: gid103b8b,public X-Google-ArrivalTime: 1991-05-10 08:14:22 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!caen!sdd.hp.com!cs.utexas.edu!rice!uw-beaver!cornell!batcomputer!theory.tn.cornell.edu!christos From: christos@theory.tn.cornell.edu (Christos S. Zoulas) Newsgroups: gnu.emacs.help Subject: Re: `tty`: Ambiguous. -- what does this mean? Message-ID: <1991May10.103931.17462@batcomputer.tn.cornell.edu> Date: 10 May 91 10:39:31 GMT References: <JACKR.91May8161341@dblues.dblues.wpd.sgi.com> <9105100644.AA08709@life.ai.mit.edu> Sender: news@batcomputer.tn.cornell.edu Organization: Electrical Engineering, Cornell University, Ithaca NY Lines: 45 Nntp-Posting-Host: theory.tn.cornell.edu