Path: utzoo!dciem!nrcaer!scs!spl1!laidbak!att!pacbell!ames!pasteur!ucbvax!decwrl!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uxc.cso.uiu From: kai@uicsrd.csrd.uiuc.edu Newsgroups: comp.unix.wizards Subject: redirection before wildcards Message-ID: <43200019@uicsrd.csrd.uiuc.edu> Date: 3 Jun 88 18:49:00 GMT Article-I.D.: uicsrd.43200019 Lines: 18 Nf-ID: #N:uicsrd.csrd.uiuc.edu:43200019:000:693 Nf-From: uicsrd.csrd.uiuc.edu!kai Jun 3 13:49:00 1988 It's pretty well known that commands like "grep whatever * > out" can cause infinate loops, because C-shell will create the file "out" before expanding the asterisk wildcard, and grep never reaches EOF once it reaches the file "out". Is there any reason for this behavior? I don't understand why the wildcard isn't expanded first. Wouldn't this eliminate one of the easier ways of filling up disk space? Does anyone know if this could cause compatibility problems? It seems too often that people USE bugs instead of FIXING them. Do Bourne and Korn shells act this way as well? Patrick Wolfe Internet: pwolfe@kailand.kai.com UUCP: ...!{uunet,ucbvax,ihnp4}!uiucuxc!kailand!pwolfe