bug-gnu-libiconv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnu-libiconv] Feature request : pipe conversion on the fly


From: Bruno Haible
Subject: Re: [bug-gnu-libiconv] Feature request : pipe conversion on the fly
Date: Sun, 3 Jul 2011 19:47:28 +0200
User-agent: KMail/1.9.9

Hi,

Xavier PUCEL wrote:
> For example, let test.sh be the following file:
> 
> #!/bin/sh
> echo Hello
> sleep 10
> echo World
> 
> Then the following command will not output anything before 10 seconds :
> ./test.sh | iconv -f ASCII
> 
> I'd like it to convert the first line as soon as it is available.

Thank you for the report. Immediate processing of what is available, combined
with line-buffered output for interactive stdout, has now been implemented,
and will be present in libiconv 1.14.

If you want to have unbuffered output, use 'iconv' like this:
  $ stdbuf -o0 iconv
For example:
  $ (echo -n abc; sleep 1; echo def) | stdbuf -o0 iconv

In passing, your suggestion also gave rise to documentation improvements
about stdbuf [1] and to forthcoming documentation improvements in gnulib [2].

Bruno

[1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8961
[2] http://www.haible.de/bruno/mycat-blog.txt
-- 
In memoriam Yuri Shchekochikhin 
<http://en.wikipedia.org/wiki/Yuri_Shchekochikhin>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]