#range #line #line-numbers

app catlines

Controls file output with line ranges!

2 stable releases

Uses old Rust 2015

1.0.4 Jun 28, 2017
1.0.3 Jun 26, 2017

#5 in #ranges

GPL-3.0 license

15KB
77 lines

catlines

It's like cat, but better!

catlines takes a file name and the range of lines (inclusive) and prints that section of the file to standard output. Useful if you want to pipe to your clipboard, or something like that.

Yes. I know I could have sed -n it, but hey, everyone should learn rust, right?

Added options include displaying the line number, and some customizations on how the line number is displayed.

Usage

Usage: catlines [options] <file> <start> <stop>
       catlines (--help | --version)

Description:
    Prints only said section from the file, ranging [start,stop] (inclusive at
    both ends).

Options:
    -h, --help      Display this help and exits
    --version       Display version information
    -l, --lines     Display corresponding line number
    -s, --spaces S  Padding for line number

Dependencies

~4.5MB
~99K SLoC