diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-10-21 17:12:03 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-10-21 17:42:40 +0300 |
commit | 2a6be9021075bae69cfac1305b6a70910a7a00dc (patch) | |
tree | aa71a6e039d532c5a526a39b4767f9a6a2b39046 /bin/lolcat | |
parent | fe2711dc10f0267a7495690dbfb28bfa80e2fc89 (diff) |
Flush output after each line
Change-Id: Id96ab8d9938725d780c475f2f892660f04448df1
Diffstat (limited to 'bin/lolcat')
-rwxr-xr-x | bin/lolcat | 2 |
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(); } } |