Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site dciem.UUCP Path: utzoo!dciem!ntt From: ntt@dciem.UUCP (Mark Brader) Newsgroups: net.unix Subject: Re: An odd difference between "cat file" and "cat Date: Wed, 18-Apr-84 18:12:43 EST Article-I.D.: dciem.863 Posted: Wed Apr 18 18:12:43 1984 Date-Received: Wed, 18-Apr-84 20:10:48 EST References: <2420@allegra.UUCP> Organization: NTT Systems Inc., Toronto, Canada Lines: 25 Alan Driscoll (allegra!alan) says: I would also have expected an error message after typing cat < abc abd In fact, both sh and csh silently ignore 'abc'. (Surprise!) But look, the following command is perfectly legitimate and useful: ed < abc abd It means to edit file abd according to the script in abc, of course. Obviously the shell has no business knowing the difference between the behavior of "cat" and "ed". And "cat" is behaving according to documentation; it is supposed to copy the standard input to the standard output only when no input file names were specified. Do you want "cat" to give an error message when a file name is specified and the standard input has been redirected? Then what happens when "cat file" occurs in a shell script whose standard input has been redirected? It ain't broke, don't fix it. Mark Brader P.S. I, too, would like to see "cat " and there is no match, by the way?