NAME
prefix - prefixes hostname time information or more to lines from stdin (or read from files)
SYNOPSIS
% tail -f /var/log/some.log | prefix -host -timestamp
tails a file, showing each line with a hostname and a timestamp like. So if we were tailing a growing file with lines like:
OK: System operational
Warning: Disk bandwitch saturated
we would get real-time output like:
arachnid.example.com 2013-10-13 16:55:49 Warning: Things are wonky: disks spinning backwards
arachnid.example.com 2013-10-13 16:55:50 Error: Data read wackbards
arachnid.example.com 2013-10-13 16:56:10 OK: Spacetime reversal complete
Note that the hostname (arachnid.example.com) and the date have been prepended.
See options below for more details.
DESCRIPTION
A text filter that prepends (or appends) data to lines read from stdin or named files, and echos them to stdout
OPTIONS
-t='example', --text='arbitrary text here'
add any particular string you like.
-t or --timestamp
Add a timestamp
-u or --utimestamp
Add a timestamp, showing fractions of a second
--hoststamp
Add the hostname
--nospace
Don't put spaces between data added
--suffix
Show added data at end of line, not start of line
--elapsed
Show time elapsed since last line seen
--quote
Show each original line read in single quotes
AUTHOR
Josh Rabinowitz <joshr>
SEE ALSO
DBIx::FileStore, fdbcat, fdbls, fdbmv, fdbput, fdbrm, fdbstat, fdbtidy