Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ulysses.UUCP Path: utzoo!watmath!clyde!akgua!mcnc!decvax!harpo!ulysses!dgk From: dgk@ulysses.UUCP (David Korn) Newsgroups: net.unix Subject: Re: An odd difference between "cat file" and "cat Date: Sat, 21-Apr-84 17:47:41 EST Article-I.D.: ulysses.833 Posted: Sat Apr 21 17:47:41 1984 Date-Received: Sun, 22-Apr-84 09:21:21 EST References: <3723@utcsrgv.UUCP>, <367@opus.UUCP> <197@alberta.UUCP>, <227@pyuxnn.UUCP> Organization: AT&T Bell Laboratories, Murray Hill Lines: 21 In the Bourne shell the command echo > file file1 file2 means the same as echo file1 file2 > file so that if echo > file* were allowed then should it be interpretted as echo > file file1 file2 as described above or as echo > "file file1 file2" as if the expansion generated the file name? The former interepretation is difficult to implement since the command has bee parsed and io arguments have been separated from command arguments by the time this decision must be made. The Bourne shell gets around this ambiguity by not doing file name generation on i/o arguments, or parameter assignments, just on command arguments. The Korn shell, ksh , which attempts to be friendlier, will perform the expansion only if a unique file name is generated.