get_line

AuthorFrancois Berenger
LicenseGPL
Homepagehttps://github.com/UnixJunkie/get_line
Issue Trackerhttps://github.com/UnixJunkie/get_line/issues
Maintainerunixjunkie@sdf.org
Dependencies
&batteries>= 2.6.0
jbuilder
PublishedApr 20, 2018
Source [http] https://github.com/UnixJunkie/get_line/archive/v4.0.0.tar.gz
ed9dcadcd1ce570b2c83dc8cc40d2b03
StatisticsInstalled 8 times last month.
Edithttps://github.com/ocaml/opam-repository/tree/master/packages/get_line/get_line.4.0.0/opam

robustly select lines from file; can replace the head and tail shell commands and do even more

usage: get_line {--range|-r} {+n|-n|i|i..j|i,j[,...]} [-i FILE] [--rand] [-v] (1 <= i [<= j] <= N; N = nb. lines in FILE)

-v invert the selection of lines (like 'grep -v') --rand randomize selected lines before writing them out -i <filename> where to read lines from (default=stdin) -o <filename> where to write lines to (default=stdout) {-r|--range} {+n|-n|i|i..j|i,j[,...]}: line selection policy;

           (+n => top n lines;
            -n => last n lines;
            n => only line n;
            i..j => lines i to j;
            i,j[,...] => only lines i,j,...

{-help|--help} Display this list of options

No package is dependent