Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Sep 2006 07:40:04 +0200
From:      Matthias Apitz <m.apitz@oclcpica.org>
To:        David Schulz <davidschulz@tca-cable-connector.com>
Cc:        FreeBSD Users Questions <freebsd-questions@freebsd.org>
Subject:   Re: Piping output from serial device to file does not want to work
Message-ID:  <20060915054004.GA15224@rebelion.Sisis.de>
In-Reply-To: <3479C24E-BC58-4F21-91D2-03E2B948EAED@tca-cable-connector.com>
References:  <3479C24E-BC58-4F21-91D2-03E2B948EAED@tca-cable-connector.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <m.apitz@oclcpica.org> - w http://www.oclcpica.org/ http://guru.UnixLand.de/



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