catlines

Crates.iocatlines
lib.rscatlines
version1.0.4
sourcesrc
created_at2017-06-26 04:00:24.922667
updated_at2017-06-28 01:54:58.43767
descriptionControls file output with line ranges!
homepage
repositoryhttps://github.com/cheukyin699/rust-lines
max_upload_size
id20732
size39,062
Cheuk Yin Ng (cheukyin699)

documentation

README

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
Commit count: 11

cargo fmt