2 个稳定版本
使用旧的 Rust 2015
| 1.0.4 | 2017年6月28日 | 
|---|---|
| 1.0.3 | 2017年6月26日 | 
#52 in #line-numbers
15KB
77 代码行
catlines
就像 cat,但更好!
catlines 接受文件名和行范围(包含),并将该部分的文件打印到标准输出。如果您想将其传递到剪贴板或其他类似操作,这将非常有用。
是的。我知道我可以使用 sed -n 完成,但是嘿,每个人都应该学习 rust,对吧?
添加的选项包括显示行号以及如何显示行号的定制。
用法
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
依赖关系
~4.5MB
~99K SLoC