ambiguous tty

Christos S. Zoulas christos at theory.tn.cornell.edu
Fri Mar 29 12:04:18 AEST 1991


In article <1991Mar28.192420.21918 at citib.com> scairns at citib.com (Scott Cairns) writes:
>Any ideas on what might be causing the following to happen?
>
>% rsh [any remote machine] pwd (or any other command)
>`tty`: Ambiguous
>
>(output from rsh command)
>%
>
>This is driving me nuts trying to find out who what or
>where is generating this.  The same problem exists for
>shell scripts executed from cron(8).

You have in your .cshrc something like:

if (`tty` == /dev/console) ....
or
set tty=`tty`

The `tty` expands to "Not a tty" in the famous globone() routine...
Unfortunately csh cannot handle multiple word word output from globone() 
and prints "Ambiguous". The simplest fix is to replace `tty` with "`tty`".

christos
-- 
+------------------------------------------------------------------------+
| Christos Zoulas         | 389 Theory Center, Electrical Engineering,   |
| christos at ee.cornell.edu | Cornell University, Ithaca NY 14853.         |
| christos at crnlee.bitnet  | Phone: (607) 255 0302 |  Fax: (607) 254 4565 |



More information about the Comp.unix.shell mailing list