Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site hadron.UUCP Path: utzoo!linus!decvax!genrad!panda!talcott!harvard!seismo!rlgvax!hadron!jsdy From: jsdy@hadron.UUCP (Joseph S. D. Yao) Newsgroups: net.unix-wizards Subject: Re: Redirection quirks: 2>&1 >file -- vs. -- >file 2>&1 Message-ID: <170@hadron.UUCP> Date: Sun, 5-Jan-86 13:01:50 EST Article-I.D.: hadron.170 Posted: Sun Jan 5 13:01:50 1986 Date-Received: Tue, 7-Jan-86 06:54:31 EST References: <649@watmath.UUCP> <1200@brl-tgr.ARPA> <3957@mhuxd.UUCP> Reply-To: jsdy@hadron.UUCP (Joseph S. D. Yao) Organization: Hadron, Inc., Fairfax, VA Lines: 18 Summary: More permutations. In article <3957@mhuxd.UUCP> rs@mhuxd.UUCP (Robert Sanderman) writes: >> > $ command 2>&1 >file >> > $ command >file 2>&1 >I understand why the above are different but why do the following >two lines produce different results: > $ 2>&1 command > file > $ command 2>&1 > file Interesting! Trying permutations, you get: 2,1 diverted 1 only diverted $ command >file 2>&1 $ command 2>&1 >file $ 2>&1 command > file $ 2>&1 > file command $ >file 2>&1 command $ >file command 2>&1 Looks like it takes the '>' tokens from the front and appends them. Not having source in hand, I'd not venture to say. -- Joe Yao hadron!jsdy@seismo.{CSS.GOV,ARPA,UUCP}