1
0
Fork 0
libreoffice/bin/lolcat
Daniel Baumann 8e63e14cf6
Adding upstream version 4:25.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-22 16:20:04 +02:00

21 lines
461 B
Perl
Executable file

#!/usr/bin/perl -w
use strict;
use IO::Handle;
die "Usage: $0 identifier\n" .
"(identifier is for example org.libreoffice)" unless $#ARGV == 0;
my $id = $ARGV[0];
open (LOGCAT, "adb logcat |") || die "Could not open pipe from adb logcat";
my $pid = '';
while (<LOGCAT>) {
if (m!^I/ActivityManager\( *\d+\): Start proc $id for activity .*: pid=(\d+)!) {
$pid = $1;
} elsif (m!^[EIWD]/[^(]+\( *$pid\)!) {
print $_;
STDOUT->flush();
}
}