Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site fortune.UUCP Path: utzoo!watmath!clyde!burl!we13!ihnp4!fortune!olson From: olson@fortune.UUCP Newsgroups: net.unix Subject: Re: An odd difference between 'cat file' - (nf) Message-ID: <3092@fortune.UUCP> Date: Wed, 18-Apr-84 15:09:30 EST Article-I.D.: fortune.3092 Posted: Wed Apr 18 15:09:30 1984 Date-Received: Thu, 19-Apr-84 04:21:13 EST Sender: notes@fortune.UUCP Organization: Fortune Systems, Redwood City, CA Lines: 27 #R:opus:-36700:fortune:26900048:000:1047 fortune!olson Apr 18 10:17:00 1984 >> I frankly don't know why there is a difference between cat ab* and cat > It seems to me that file name expansion should be done before anything else. > > So tell me, what would you expect to see if ab* matched two or more files? > Tom Gloger > ihnp4!ltuxa!tty3b!tag The same as what the csh or sh does if you give it explicit names! The other files are passed as arguments to the command; (e.g. cat > a b), neither csh or sh care where the '> file' occurs in the command line. Unfortunately this is NOT what happens. If you have files a1 and a2, and type cat > a*, sh will (SILENTLY!) create a file called a* (as complained about in the original note), while csh complains 'a*: Ambiguous' (even if nonomatch is set). The basic complaint is that sh does NOT expand wild cards after >, <, <<, and >> (and their variants), while csh does. How ambiguity or lack of matches are handled is something else altogether! Dave Olson, Fortune Systems UUCP: {ihnp4,ucbvax!amd70}!fortune!olson ARPA: amd70!fortune!olson@BERKELEY