Posted By

mahome on 10/17/13


Tagged


Versions (?)

Print file with line number, line lenght and starting line


 / Published in: Java
 

This is useful to view files with long lines like MySQL dumps.

Example output: line, lenght, first characters (as defined in substr)

    1       19     -- MySQL dump 10.11
    2        2     --
    3       36     -- Host: localhost    Database: live
    4       57     -- ------------------------------------------------------
    5       40     -- Server version    5.0.51a-3ubuntu5.4-log
    6        0     
    7       65     /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    8       67     /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    9       65     /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
   10       27     /*!40101 SET NAMES utf8 */;

Report this snippet  

You need to login to post a comment.