Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jul 1999 21:41:44 +0100
From:      Ben Smithurst <ben@scientia.demon.co.uk>
To:        Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: save cc output to a file
Message-ID:  <19990718214144.A96716@rainbow5.scientia.demon.co.uk>
In-Reply-To: <379230E9.9FFDE1A1@cs.binghamton.edu>
References:  <379230E9.9FFDE1A1@cs.binghamton.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990718214144.A96716>