Giter Site home page Giter Site logo

log-start-end's Introduction

log-start-end

Print the first and last timestamps in a log file.

Usage

usage: timestamps.py [-h] [-v] [-r REGEX] [-s SORT] file [file ...]

Print first and last timestamp from log files. Default: YYYY-MM-DD HH:mm:ss,sss

positional arguments:
  file                  log file

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Verbose output
  -r REGEX, --regex REGEX
                        Timestamp regex
  -s SORT, --sort SORT  Sort order: FILENAME (default), FIRST, or LAST

Output

FILENAME      FIRST                     LAST
system1.log   2021-08-03 11:26:17,814   2021-08-03 14:13:31,642
system2.log   2022-10-10 06:50:47,147   2022-10-13 08:47:10,208
system3.log   2022-10-12 19:52:22,264   2022-10-15 18:24:33,522
system4.log   2022-10-13 02:30:10,772   2022-10-15 23:31:03,703

log-start-end's People

Contributors

brandonbordeaux avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.