Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!brl-tgr!tgr!hugh@BRL-BMD.ARPA From: hugh@BRL-BMD.ARPA (USAFAS) Newsgroups: net.unix Subject: K&P \"pick\" Message-ID: <9721@brl-tgr.ARPA> Date: Wed, 3-Apr-85 18:07:20 EST Article-I.D.: brl-tgr.9721 Posted: Wed Apr 3 18:07:20 1985 Date-Received: Mon, 8-Apr-85 00:13:32 EST Sender: news@brl-tgr.ARPA Lines: 38 Hi, I'm trying to install the pick command from page 187 of "The Unix Programming Environment", by Kernighan & Pike. I've included the routines "ttyin" and "system" (the latter being the improved version 224 of K&P). When I try to use "pick", I get the response "can't open file /dev/tty mode r" an error message from "efopen" (from page 182 (another routine I included from K&P)). This error is returned when fopen(file, mode) returns NULL. I did an "ls -l" on /dev/tty and got the following setting (or something close--unfortunately, I didn't copy it down): M-wx-ws-w- (with a very large file size) I asked my system administrator to execute a "chmod o+r /dev/tty" He executed a chmod (I am not sure that it was as specified above) and a "ls -l" now returns crw-rw-rw root 0 Unfortunately, "pick" still returns the same error, and when I try the shell version of "pick" from page 160 of K&P, an error is returned telling me that there is no such device as /dev/tty. I have two questions. First, what does that capital M mean in the ls above. Second, why doesn't "pick" work? Thanks for any pointers, hugh dempsey hugh@brl