From owner-freebsd-current@FreeBSD.ORG Tue Aug 3 18:39:41 2010 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CE43106564A for ; Tue, 3 Aug 2010 18:39:41 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id BF9F58FC12 for ; Tue, 3 Aug 2010 18:39:40 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id A910A14DC476; Tue, 3 Aug 2010 20:22:04 +0200 (CEST) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ki6dsO8MrC4O; Tue, 3 Aug 2010 20:22:02 +0200 (CEST) Received: from [192.168.1.105] (catv-80-99-92-167.catv.broadband.hu [80.99.92.167]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 5144814DC475; Tue, 3 Aug 2010 20:22:02 +0200 (CEST) Message-ID: <4C585E44.5030608@FreeBSD.org> Date: Tue, 03 Aug 2010 20:21:56 +0200 From: Gabor Kovesdan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: poyopoyo@puripuri.plala.or.jp References: <86eiefhalp.wl%poyopoyo@puripuri.plala.or.jp> In-Reply-To: <86eiefhalp.wl%poyopoyo@puripuri.plala.or.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@FreeBSD.org Subject: Re: bsdgrep does not work with tail -f | grep combination X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2010 18:39:41 -0000 Em 2010.08.03. 19:25, poyopoyo@puripuri.plala.or.jp escreveu: > Hi, > > It seems bsdgrep does not work when piped from tail -f. > I'm running r210728. > > term0$ jot 10> /tmp/1 > term0$ tail -f /tmp/1 | grep 0 > [no output] > > otherterm$ jot 10>> /tmp/1 > [no output to term0] > > ===== > > with GNU grep: > > term0$ tail -f /tmp/1 | gnugrep 0 > 10 > otherterm$ jot 10>> /tmp/1 > [on term0] > 10 > 10 > I've checked on 8.0 and GNU grep doesn't output anything either for me. If you use tail -f, you will enter more lines and end it with EOF, won't you? And then BSD grep will process the input and print out matches. I don't think it's bad behaviour in itself but if you can explain why you think it's bad I'm willing to change it. Thanks for your comment, Gabor