Mike Schilli's Friendly Neighborhood Perl Shop

Home
USArundbrief.com
Resume
CPAN Modules
Articles in English
Articles in German
Mike's Script Archive
English-Japanese Translation Trainer
Adventures with O'Reilly's Safari
10 Easy Steps to Become a California Driver
Unofficial perlmonks.com IRC Channel
My Collection of Outage Pages
Prisma (Computer Club Deutschland)
Mike's Monologues
Mike's Script Archive: trackcat

trackcat - cat with a persistent tracker


NAME

    trackcat - cat with a persistent tracker


DOWNLOAD

trackcat


SYNOPSIS

    trackcat [-t track_file] filename


DESCRIPTION

Upon the first invocation, trackcat prints the content of a given file to STDOUT. It keeps track of the file's length, and upon the next call, it will only print newly appendend lines.

The current cursor position within the tracked file will be stored on a separate file on disk. The name of the tracker file can be defined with the -t option. By default, the tracker file is going to be located in the same directory as the original file, under the name .file.tracker if file is the original file name.


EXAMPLES

  $ trackcat mailfile
       # prints content of mailfile
       # ... time passes, lines added to mailfile
  $ trackcat mailfile
       # prints newly appended lines only


LEGALESE

Copyright 2005 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.


AUTHOR

2005, Mike Schilli <m@perlmeister.com>


Latest update: 20-Oct-2013