From owner-freebsd-stable@FreeBSD.ORG Wed Nov 20 22:39:03 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11DCE345 for ; Wed, 20 Nov 2013 22:39:03 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C5A752EA4 for ; Wed, 20 Nov 2013 22:39:02 +0000 (UTC) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 03BDA5C43; Wed, 20 Nov 2013 23:38:54 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_A19706EC-9417-4AC2-9BA5-A901F8CCC40F"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: tcpdump | grep pattern > capture nothing got From: Dimitry Andric In-Reply-To: <528D0302.7090906@peterschmitt.fr> Date: Wed, 20 Nov 2013 23:38:44 +0100 Message-Id: <966AFB1F-D273-4754-96AC-01298FBF6F42@FreeBSD.org> References: <528D0302.7090906@peterschmitt.fr> To: Florent Peterschmitt X-Mailer: Apple Mail (2.1822) Cc: freebsd-stable stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Nov 2013 22:39:03 -0000 --Apple-Mail=_A19706EC-9417-4AC2-9BA5-A901F8CCC40F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On 20 Nov 2013, at 19:44, Florent Peterschmitt = wrote: > I use FreeBSD 10.0-BETA3 amd64, upgraded from 9.2-RELEASE with > freebsd-update. >=20 > I was capturing with tcpdump and doing some grep on it: >=20 > # tcpdump -li nfe0 port 53 | grep Refused > capture.txt >=20 > I was surprised that capture.txt is totally empty. If I don't redirect > the output, then it writes what I need on stdout. Try grep --line-buffered instead (which incurs a performance penalty, but you probably don't care in this case). BSD grep also supports this option. -Dimitry --Apple-Mail=_A19706EC-9417-4AC2-9BA5-A901F8CCC40F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlKNOf0ACgkQsF6jCi4glqNHLgCgsWLN3cdAo6+EOkd/x791kZgz SZ0AoMWrGzH6pjILQBtBwrDYJpdQ1LiT =lku9 -----END PGP SIGNATURE----- --Apple-Mail=_A19706EC-9417-4AC2-9BA5-A901F8CCC40F--