This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Buffering problem in netcat server script
- From: Sven Severus <s dot severus at hima dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 12 Sep 2012 08:17:49 +0200
- Subject: RE: Buffering problem in netcat server script
Adam Dinwoodie wrote:
> From `mad sed`:
>
> -u, --unbuffered
>
> load minimal amounts of data from the input files and flush the output
> buffers more often
>
> If you add the -u option, sed will buffer less and write to the pipe more
> often. I would guess this isn't the default as it's less efficient, but
> haven't done anything to verify that.
>
> I believe `cat` never buffers, but I base this on nothing but instinct.
>
> A quick experiment on my handy RHEL box implies this is not Cygwin specific;
> the following command shows buffering behaviour too:
>
> tail -f tmpfile | sed 's/e/E/g' | tee outfile
>
> (I'm using the pipelines so I can see what's going on without sed thinking
> stdin or stdout are a terminal.)
Thanks a lot for your reply.
Sven
--
Mit freundlichen Grüßen
Dipl. Inform. Sven Severus
Softwareentwicklung
----------------------------------------------------------
HIMA Paul Hildebrandt GmbH + CO KG
Abt: Entwicklung Software
Albert-Bassermann-Strasse 28
68782 Bruehl
Germany
Tel: +49 6202 709-289
Fax: +49 6202 709-299
E-Mail: s.severus@hima.com
Internet: www.hima.de
--
HIMA Paul Hildebrandt GmbH + Co KG, Albert-Bassermann-Str. 28, 68782 Bruehl bei Mannheim
Kommanditgesellschaft, Sitz Bruehl, Deutschland - Registergericht Mannheim HRA 421017
Ust-ID: DE 144286400, St.Nr: 43038 00190
Persoenlich haftende Gesellschafterin Paul Hildebrandt Verwaltungsgesellschaft mbH,
Sitz Bruehl, Deutschland - Registergericht Mannheim HRB 420588
Geschaeftsfuehrer: Dipl.-Betriebswirt Steffen Philipp
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple