Skip to content
/ cat Public

golang实现的cat命令(所有功能),也可以看成https://github.com/guonaihong/clop 的使用示例

License

Notifications You must be signed in to change notification settings

antlabs/cat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cat

cat 是golang 实现的cat命令,完成了cat命令的所有功能,对posix cat命令实现细节感兴趣的童鞋可以看下,同时也是https://github.com/guonaihong/clop 库的使用示例

install

// go build -o cat github.com/antlabs/cat/_cmd
env GOPROXY="goproxy.cn" go install github.com/antlabs/cat/cat@latest

usage

Usage:
    ./cat [Flags] <files> 

Flags:
    -A,--show-all            equivalent to -vET
    -E,--show-ends           display $ at end of each line
    -T,--show-tabs           display TAB characters as ^I
    -b,--number-nonblank     number nonempty output lines, overrides
    -e                       
    -n,--number              number all output lines
    -s,--squeeze-blank       suppress repeated empty output lines
    -t                       equivalent to -vT
    -v,--show-nonprinting    use ^ and M- notation, except for LFD and TAB

Args:
    <files>  

About

golang实现的cat命令(所有功能),也可以看成https://github.com/guonaihong/clop 的使用示例

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages