Commit 6c09e8b4 authored by Felix Eckhofer's avatar Felix Eckhofer 🤹🏼
Browse files

add timestamp.pl

parent 7798af2f
#!/usr/bin/perl
# add timestamp to stdin (for long-running commands or with tail), e.g.
# tail -f logfile | timestamp.pl
use POSIX qw(strftime);
while (<>) {
my $date = strftime "[%Y-%m-%d %H:%M:%S]", localtime;
print "$date $_";
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment