Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site bu-cs.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!bu-cs!ccc From: ccc@bu-cs.UUCP (Cameron Carson) Newsgroups: net.bugs.4bsd Subject: Re: slight problem with grep. Message-ID: <134@bu-cs.UUCP> Date: Tue, 4-Feb-86 11:20:11 EST Article-I.D.: bu-cs.134 Posted: Tue Feb 4 11:20:11 1986 Date-Received: Thu, 6-Feb-86 05:14:18 EST References: <140@calma.UUCP> Organization: Boston Univ Comp. Sci. Lines: 28 >In article <9299@ritcv.UUCP> jxs7451@ritcv.UUCP () writes: >>What happened is I used grep like this to find all of them. >> >> grep write * > zzzz >> >>having zzzz being a random file. > >Note that this will only happen if 'zzzz' is an existing file. If >either of the following situations occur, there won't be a problem: > grep write * > AAAA <- AAAA doesn't contain 'write' > rm zzzz ; grep write * > zzzz > >In the first situation, the file 'AAAA' is searched first. >In the second situation, the '*' doesn't match the file 'zzzz', >so grep never even opens it. Hmmm...I had the same experience as jxs7451@ritcv: in the 4bsd csh's I've used, the shell takes care of creating stdout before it does file name expansion, resulting in '*' matching 'zzzz' even if it didn't exist previously. -- Cameron C. Carson Distributed Systems Group Boston University ACC UUCP: ...!harvard!bu-cs!ccc ARPA: ccc%bu-cs@csnet-relay.arpa