Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Dec 2002 15:14:49 -0500
From:      Edmond Baroud <SoHo@admin.fido.ca>
To:        pura life CR <puralifecr@hotmail.com>
Cc:        FreeBSD-questions@FreeBSD.ORG
Subject:   Re: stderr redirection
Message-ID:  <20021217201449.GA38112@admin.fido.ca>
In-Reply-To: <F92hUOEO5EivEjeAGVk00004dba@hotmail.com>
References:  <F92hUOEO5EivEjeAGVk00004dba@hotmail.com>

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

in =3D 0
out =3D 1
err =3D 2

and by putting >2 in after your =02grep foo=02 command your redirecting
your stdout to a file called 2.
to redirect stderr to /dev/null u can do:
=02%du -a / | grep foo 2>/dev/null=02

regards,

Ed.

Quoting pura life CR (puralifecr@hotmail.com):
> (1) Hi, I would like to know how can I redirect stdin, stdout and/or stde=
rr=20
> from an interactive shell?
>=20
> (2) I am confused, it's smthg like %du -a / | grep foo >2 /dev/null ?
> In this case, I am looking for certain files and I dont want to view=20
> annonying message such as "permised denied" so the goal is redirect stder=
r=20
> to /dev/null, howto??.
>=20
>=20
> regards,
>=20
>=20
>=20
>=20
> _________________________________________________________________
> =DAnete al mayor servicio mundial de correo electr=F3nico:=20
> http://www.hotmail.com
>=20
>=20
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

--=20
Edmond Baroud=20
UNIX Systems Admin             mailto:SoHo@admin.fido.ca
Fingerprint  140F 5FD5 3FDD 45D9 226D  9602 8C3D EAFB 4E19 BEF9
"UNIX is very user friendly, it's just picky about who its friends are."



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?20021217201449.GA38112>