summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-10-21 17:12:03 +0300
committerTor Lillqvist <tml@collabora.com>2014-10-21 17:42:40 +0300
commit2a6be9021075bae69cfac1305b6a70910a7a00dc (patch)
treeaa71a6e039d532c5a526a39b4767f9a6a2b39046
parentfe2711dc10f0267a7495690dbfb28bfa80e2fc89 (diff)
Flush output after each line
Change-Id: Id96ab8d9938725d780c475f2f892660f04448df1
-rwxr-xr-xbin/lolcat2
1 files changed, 2 insertions, 0 deletions
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 (<LOGCAT>) {
$pid = $1;
} elsif (m!^[EIW]/[^(]+\( *$pid\)!) {
print $_;
+ STDOUT->flush();
}
}