From owner-freebsd-questions Sun Jul 18 15:44: 7 1999 Delivered-To: freebsd-questions@freebsd.org Received: from scientia.demon.co.uk (scientia.demon.co.uk [212.228.14.13]) by hub.freebsd.org (Postfix) with ESMTP id 7B68F14D14 for ; Sun, 18 Jul 1999 15:43:55 -0700 (PDT) (envelope-from ben@scientia.demon.co.uk) Received: from rainbow5.scientia.demon.co.uk ([192.168.1.2] ident=exim) by scientia.demon.co.uk with esmtp (Exim 3.02 #1) id 115xkl-0000Fi-00; Sun, 18 Jul 1999 21:41:43 +0100 (envelope-from ben@rainbow5.scientia.demon.co.uk) Received: from rainbow5.scientia.demon.co.uk (ident=ben) by rainbow5.scientia.demon.co.uk with local (Exim 3.02 #1) id 115xkm-000PBH-00; Sun, 18 Jul 1999 21:41:44 +0100 (envelope-from ben@rainbow5.scientia.demon.co.uk) Date: Sun, 18 Jul 1999 21:41:44 +0100 From: Ben Smithurst To: Zhihui Zhang Cc: freebsd-questions@freebsd.org Subject: Re: save cc output to a file Message-ID: <19990718214144.A96716@rainbow5.scientia.demon.co.uk> References: <379230E9.9FFDE1A1@cs.binghamton.edu> Mime-Version: 1.0 Content-Type: multipart/signed; boundary=YZ5djTAD1cGYuMQK; micalg=pgp-md5; protocol="application/pgp-signature" X-Mailer: Mutt 0.95.4i In-Reply-To: <379230E9.9FFDE1A1@cs.binghamton.edu> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Zhihui Zhang wrote: > This should be a simple question, but I just do not know how to save > the output of $ cc -c filename.c to a file which is useful when you > have a lot of errors in your program. The following two do not work: >=20 > $ cc -c filename.c > out.dat > $ cc -c filename.c 2>out.dat The second one works for me, in bash, and should work in sh as well. Have you checked the man page for whatever shell you are using? In csh, % cc -c filename.c >& out.dat should work. --=20 Ben Smithurst | PGP: 0x99392F7D ben@scientia.demon.co.uk | key available from keyservers and | ben+pgp@scientia.demon.co.uk --YZ5djTAD1cGYuMQK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: 2.6.3i iQCVAwUBN5I8BysPVtiZOS99AQGp1AP7BDh4T557NrYIo33uu+doRl+AvAs8PGPn z4H7ffrx9BrbhGqaqJHvvVWk+wsDHkB/d3Ccsg3yaC0D43Ep7Lms/T/HX3cU+DRE QfAL/kFiSrsqoByxnvwcJ3A0tdexcZKOVHepZwmWmjojDFDV2sc4LofNe73GHFKW 0/QknVljU+k= =CvJ8 -----END PGP SIGNATURE----- --YZ5djTAD1cGYuMQK-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message