Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!elroy!cit-vax!joe From: joe@cit-vax.Caltech.Edu (Joe Beckenbach) Newsgroups: comp.unix.wizards Subject: Re: a.out 1> file.out 2> file.err in csh? Keywords: csh stdout stderr redirect Message-ID: <8420@cit-vax.Caltech.Edu> Date: 27 Oct 88 16:39:52 GMT References: <4470006@hpindda.HP.COM> <506@ccncsu.ColoState.EDU> Reply-To: joe@cit-vax.UUCP (Joe Beckenbach) Organization: California Institute of Technology Lines: 27 In his article kmont@hpindda.HP.COM (Kevin Montgomery) writes: >>Hate to be this cluelessly stupid, but something's been bugging the >>hell out of me- how do you do the Bourne : >> >> a.out 1> file.stdout 2> file.stderr >> >>in the csh? ("a.out > file.stdout >& file.stderr" doesn't cut it, >>since ">&" is defined to be BOTH stdout and stderr, hence is an >>ambiguous redirection) In his article dempsey@handel.colostate.edu..UUCP (Steve Dempsey) writes: >This is far from obvious, so no need to feel cluelessly stupid: > > ( a.out > file.stdout ) >& file.stderr I tried the most natural thing in the world: following the 'law of least astonishment'. I did a.out >&file.stderr >file.stdout and of course the rest is ambiguity. :-) Do any shells out there (besides sh) handle redirecting stderr INDEPENDENT of stdout? I think that csh was very naughty in mixing the streams-- do we have to try writing a public-domain shell in order to have a well-distributed sane shell? [ gsh! ;-) :-) have you beat me to the punch, FSF?] -- Joe Beckenbach joe@csvax.caltech.edu Caltech 256-80, Pasadena CA 91125 ... or have I not seen enough code yet to throw stones? 1/2 :-)