From owner-freebsd-questions Thu May 18 7:56:56 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.rdc1.va.home.com (ha1.rdc1.va.home.com [24.2.32.66]) by hub.freebsd.org (Postfix) with ESMTP id 714F637B507 for ; Thu, 18 May 2000 07:56:54 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx ([24.6.244.187]) by mail.rdc1.va.home.com (InterMail vM.4.01.02.00 201-229-116) with ESMTP id <20000518145653.SMTD22611.mail.rdc1.va.home.com@john.baldwin.cx>; Thu, 18 May 2000 07:56:53 -0700 Content-Length: 1232 X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <003e01bfc0c9$11544c80$8c0aa8c0@hk.tbv.se> Date: Thu, 18 May 2000 10:57:37 -0400 (EDT) From: John Baldwin To: James A Wilde Subject: RE: Redirection Cc: FreeBSD Questions Message-Id: <20000518145653.SMTD22611.mail.rdc1.va.home.com@john.baldwin.cx> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 18-May-00 James A Wilde wrote: > A quick clarification first: Root's default shell is the Bourne shell, sh. > User's default shell is csh. And presumably when User su's, his shell > becomes the Bourne shell. The machine is running 3.1, btw. (Does anyone > know if it is the same on Solaris 7?) > > Almost all I do on the machine has to be done as root, so we are talking > Bourne shell. I'd like a simple formula for sending stdout and stderr to a > file when I run make. The man page has me totally confused. In other > words: > > command [some incantation involving 12&> and a filename, possibly with |] > > which lets me see what's going on on the screen and save the same stuff to a > file. > > TIA > > mvh/regards > > James # make > output.log 2>&1 This redirects stdout to 'output.log', and then redirects stderr (file descriptor #2) to stdout (file descriptor #1) which is already being sent to output.log. If you wanted the errors to go to a seperate file, you could do this: # make > output.log 2> error.log HTH -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message