mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-29 09:52:35 +00:00
19 lines
349 B
Perl
Executable File
19 lines
349 B
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
use POSIX qw( strftime );
|
|
|
|
while (<>) {
|
|
my $ln = $_;
|
|
if ($ln =~ /^(\d+)\.(\d+): (.*)/) {
|
|
my $time_sec = $1;
|
|
my $usec = $2;
|
|
my $rest = $3;
|
|
my $usec_pad = sprintf("%06d", $usec);
|
|
my $dt = strftime("%Y-%m-%d %H:%M:%S", localtime($time_sec));
|
|
print "$dt.$usec_pad $rest\n";
|
|
}
|
|
else {
|
|
print $ln;
|
|
}
|
|
}
|