Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Felix Eckhofer
tools
Commits
6c09e8b4
Commit
6c09e8b4
authored
Dec 10, 2013
by
Felix Eckhofer
🤹🏼
Browse files
add timestamp.pl
parent
7798af2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/timestamp.pl
0 → 100755
View file @
6c09e8b4
#!/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
$_
";
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment