From owner-freebsd-questions@FreeBSD.ORG Fri Sep 15 05:40:39 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF92616A412 for ; Fri, 15 Sep 2006 05:40:39 +0000 (UTC) (envelope-from m.apitz@oclcpica.org) Received: from hunter.Sisis.de (hunter.sisis.de [193.31.11.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0642543D4C for ; Fri, 15 Sep 2006 05:40:36 +0000 (GMT) (envelope-from m.apitz@oclcpica.org) Received: (from mail@localhost) by hunter.Sisis.de (8.8.8/8.8.8) id HAA25627; Fri, 15 Sep 2006 07:36:57 +0200 (CEST) (envelope-from m.apitz@oclcpica.org) Received: from ppp-82-135-75-83.dynamic.mnet-online.de(82.135.75.83) by hunter.Sisis.de via smap (V2.1) id xma025619; Fri, 15 Sep 06 07:36:39 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.13.4/8.13.4/Submit) id k8F5e4oL015409; Fri, 15 Sep 2006 07:40:04 +0200 (CEST) (envelope-from m.apitz@oclcpica.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to m.apitz@oclcpica.org using -f Date: Fri, 15 Sep 2006 07:40:04 +0200 From: Matthias Apitz To: David Schulz Message-ID: <20060915054004.GA15224@rebelion.Sisis.de> References: <3479C24E-BC58-4F21-91D2-03E2B948EAED@tca-cable-connector.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3479C24E-BC58-4F21-91D2-03E2B948EAED@tca-cable-connector.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 6.0-RELEASE (i386) Cc: FreeBSD Users Questions Subject: Re: Piping output from serial device to file does not want to work X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2006 05:40:40 -0000 El día Friday, September 15, 2006 a las 01:23:32PM +0800, David Schulz escribió: ... > > So using this command : egrep -v -e "\---|^$|Date" -D read /dev/ > cuad0 , works, and puts out the data to stdout for me to see, but > when i want to pipe it to a file, using egrep -v -e "\---|^$|Date" - > D read /dev/cuad0 >> logfile , then never any data appears in the > logfile. Can anyone tell me wht that is, and maybe suggest a better > way to do this? The data is in the output buffer of egrep's STDOUT and not written until EOF on STDIN (which perhaps will never occur) or until certain bufsize is reached; you may use the flag '--line-buffered' of egrep; matthias -- Matthias Apitz Manager Technical Support - OCLC PICA GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclcpica.org/ http://guru.UnixLand.de/