From 2a6be9021075bae69cfac1305b6a70910a7a00dc Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 21 Oct 2014 17:12:03 +0300 Subject: Flush output after each line Change-Id: Id96ab8d9938725d780c475f2f892660f04448df1 --- bin/lolcat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/lolcat b/bin/lolcat index a97137b72493..ecc30655b5c2 100755 --- a/bin/lolcat +++ b/bin/lolcat @@ -1,6 +1,7 @@ #!/usr/bin/perl -w use strict; +use IO::Handle; die "Usage: $0 identifier\n" . "(identifier is for example org.libreoffice)" unless $#ARGV == 0; @@ -15,5 +16,6 @@ while () { $pid = $1; } elsif (m!^[EIW]/[^(]+\( *$pid\)!) { print $_; + STDOUT->flush(); } } -- cgit