From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1G43pA-0007CG-3N for garchives@archives.gentoo.org; Fri, 21 Jul 2006 22:50:24 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k6LMmv09029853; Fri, 21 Jul 2006 22:48:57 GMT Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k6LMhVC2017828 for ; Fri, 21 Jul 2006 22:43:31 GMT Received: by nf-out-0910.google.com with SMTP id m19so946214nfc for ; Fri, 21 Jul 2006 15:43:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=HV7pqsku7oD4uUm5nHeHFDCv/j76glJ+cj84q86HwQOmz5nKkLUOnPE0sxdan0p/ULRBZtWNs86J9/lZgCSUsSrSWhWHMblcF7s7syGNdGHuasJ8LvWLCC+h2PXaYmcJNplEGswsxbm0+x5TODvp6/jDBLrHdS8tLgQVgLJ1Xus= Received: by 10.78.165.16 with SMTP id n16mr617206hue; Fri, 21 Jul 2006 15:43:30 -0700 (PDT) Received: by 10.78.16.7 with HTTP; Fri, 21 Jul 2006 15:43:30 -0700 (PDT) Message-ID: <7573e9640607211543h449e222dwd559550852ce0bac@mail.gmail.com> Date: Fri, 21 Jul 2006 15:43:30 -0700 From: "Richard Fish" Sender: richard.j.fish@gmail.com To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] redirect In-Reply-To: <44C14314.8050303@lockie.ca> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <44C14314.8050303@lockie.ca> X-Google-Sender-Auth: 9d070999ade08ca8 X-Archives-Salt: 19d04ced-52ee-451c-8e22-959b8e022bcf X-Archives-Hash: e3ee83314d156cfccc4ec78d5a1172a8 On 7/21/06, James Lockie wrote: > How do I redirect the error from an emerge? > I did 'emerge system 2>&1 >t' and that does most of it but it misses the > actual error message. 2>&1 >foo is the wrong syntax for what you want. This first copies stderr to stdout, and the second part redirects stdout to a file, but stderr is still going to the file descriptor that stdout originally refered to. It is logically the equivalent of: stdout=1 stderr=2 stderr=$stdout stdout=foo echo $stderr The correct syntax is ">foo 2>&1", which does the logical equivalent of: stdout=1 stderr=2 stdout=foo stderr=$stdout HTH, -Richard -- gentoo-user@gentoo.org mailing list