Xref: utzoo comp.unix.questions:31023 comp.unix.shell:2104 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!wuarchive!emory!wrdis01!nstn.ns.ca!clyde.concordia.ca!altitude!matrox!uvm-gen!kira!nic!news.cs.brandeis.edu!news!morgan From: morgan@chaos.cs.brandeis.edu (Dylan Kaufman) Newsgroups: comp.unix.questions,comp.unix.shell Subject: csh question Message-ID: Date: 1 May 91 19:21:30 GMT Sender: usenet@news.cs.brandeis.edu Distribution: comp Organization: Computer Science, Brandeis University, Waltham, MA, USA Lines: 37 Hi, I am trying to write a script which will be run by cron and which will notify me if someone somewhere is logged on. What I mean by that is that the script will check to see whether I am logged on (if not, it doesn't need to bother...) and then (assuming I am) check to see whether there is someone logged onto another account on another computer. If there is, it should then determine what tty I am logged onto and either cat or write to my tty... the problem is that it doesn't work... I get mail from root saying that my cron output is stty: : Not a typewriter. The same thing happens when I try having it send me mail rather than using cat or write. The code I have is as follows: #!/bin/csh set a=`f|fgrep -c morgan` if ($a != 0) then set b=`finger @eris.berkeley.edu|fgrep -c morgan` if ($b != 0) then set c=`w morgan|fgrep morgan|cut -f4 -d' '` cat ~/cronfile > /dev/$c endif endif Any help would be appreciated. Thank you in advance, -- -<>Dylan<>- MA EMT-M, CA EMT-1A, BEMCo 107 Dylan Kaufman Major in Computer Science morgan@chaos.cs.brandeis.edu Brandeis University, Waltham, MA ------<< Support your local Emergency Medical Services >>------- "Don't ask me, I'm just improvising" -RUSH