Newsgroups: comp.unix.shell Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!theory.tn.cornell.edu!christos From: christos@theory.tn.cornell.edu (Christos S. Zoulas) Subject: Re: ambiguous tty Message-ID: <1991Mar29.020418.20224@batcomputer.tn.cornell.edu> Sender: news@batcomputer.tn.cornell.edu Nntp-Posting-Host: theory.tn.cornell.edu Organization: Electrical Engineering, Cornell University, Ithaca NY References: <1991Mar28.192420.21918@citib.com> Date: Fri, 29 Mar 1991 02:04:18 GMT In article <1991Mar28.192420.21918@citib.com> scairns@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@ee.cornell.edu | Cornell University, Ithaca NY 14853. | | christos@crnlee.bitnet | Phone: (607) 255 0302 | Fax: (607) 254 4565 |