Date: Fri, 22 Sep 2000 22:27:44 -0700 (PDT) From: Dima Dorfman <dima@unixfreak.org> To: "David J. Kanter" <david.kanter@mindspring.com> Cc: "questions@FreeBSD.ORG" <questions@FreeBSD.ORG> Subject: Re: "make" output redirected to file Message-ID: <20000923052744.831821F1E@static.unixfreak.org> In-Reply-To: <20000923002313.A47384@freebsd.mindspring.com> from "David J. Kanter" at "Sep 23, 2000 00:23:13 am"
next in thread | previous in thread | raw e-mail | index | archive | help
> On Fri, Sep 22, 2000 at 11:56:41PM -0400, Matthew Emmerton wrote: > > If you're using ksh or sh as your shell, executing 'command 2>&1 > file' > > works well. (The logic here is this: 2>&1 says to redirect file handle 2 > > (stderr) to file handle 1 (stdout), which is then redirected to file.) > ---end quoted text--- > > I think it's the other way around (i.e., 2 is stdout and 1 is > stderr). Nope, Matthew was correct. From unistd.h: #define STDIN_FILENO 0 /* standard input file descriptor */ #define STDOUT_FILENO 1 /* standard output file descriptor */ #define STDERR_FILENO 2 /* standard error file descriptor */ And just in case the originator is using csh, the syntax there would be: `make >& file` -- Dima Dorfman <dima@unixfreak.org> Finger dima@unixfreak.org for my public PGP key. "Never understimate the power of human stupidity." -- Robert A. Heinlein To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000923052744.831821F1E>