show only non-bare remotes
[hband-tools.git] / user-tools / timestamper
blob5a5fdfc0b8b3c3a0051be5989316e8b767699472
1 #!/usr/bin/env perl
3 use POSIX qw/strftime/;
5 $fmt = $ENV{'TIMESTAMP_FMT'} || '%F %T %z';
8 while(<STDIN>)
10 print strftime($fmt, localtime);
11 print "\t";
12 print $_;
16 __END__
18 =pod
20 =head1 NAME
22 timestamper - Prepend a timestamp to each input line
24 =head1 SYNOPSIS
26 timestamper
28 =head1 DESCRIPTION
30 Read STDIN and put everything on STDOUT, only prepending each line by a timestamp and a B<TAB> char.
32 =head1 ENVIRONMENT
34 =over 4
36 =item TIMESTAMP_FMT
38 Timestamp format, see strftime(3).
39 Default is "%F %T %z".
41 =back
43 =head1 SEE ALSO
45 ts(1) from moreutils
47 =cut