|
9 | 9 | - [:beer: c](#beer-c)
|
10 | 10 | - [示例](#%E7%A4%BA%E4%BE%8B)
|
11 | 11 | - [参考资料](#%E5%8F%82%E8%80%83%E8%B5%84%E6%96%99)
|
12 |
| - - [:beer: colines](#beer-colines) |
| 12 | + - [:beer: coat](#beer-coat) |
13 | 13 | - [示例](#%E7%A4%BA%E4%BE%8B-1)
|
14 | 14 | - [:beer: a2l](#beer-a2l)
|
15 | 15 | - [示例](#%E7%A4%BA%E4%BE%8B-2)
|
@@ -80,36 +80,67 @@ ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAz+ETZEgoLeIiC0rjWewdDs0sbo8c...== [email protected]
|
80 | 80 |
|
81 | 81 | [拷贝复制命令行输出放在系统剪贴板上](http://oldratlee.com/post/2012-12-23/command-output-to-clip),给出了不同系统可用命令。
|
82 | 82 |
|
83 |
| -:beer: [colines](../colines) |
| 83 | +:beer: [coat](../coat) |
84 | 84 | ----------------------
|
85 | 85 |
|
86 |
| -彩色`cat`出文件行,方便人眼区分不同的行。 |
87 |
| -支持`Linux`、`Mac`、`Windows`(`cygwin`、`MSSYS`)。 |
88 |
| -命令支持选项、功能和使用方式与[`cat`命令](https://linux.die.net/man/1/cat)完全一样(实际上在实现上全部代码给`cat`命令)。 |
| 86 | +彩色`cat`出文件行,方便人眼区分不同的行。 |
| 87 | +支持`Linux`、`Mac`、`Windows`(`cygwin`、`MSSYS`)。 |
| 88 | + |
| 89 | +命令支持选项、功能和使用方式与[`cat`命令](https://linux.die.net/man/1/cat)完全一样(实际上读流操作在实现上全部代理给`cat`命令)。 |
89 | 90 |
|
90 |
| -命令名`colines`意思是`COLorful LINES`。 |
| 91 | +命令名`coat`意思是`COlorful cAT`;当然单词`coat`的意思是外套,彩色输入行就像件漂亮的外套~ :satisfied: |
91 | 92 |
|
92 | 93 | ### 示例
|
93 | 94 |
|
94 | 95 | ```bash
|
95 |
| -$ echo a | colines |
| 96 | +$ echo a | coat |
96 | 97 | a
|
97 |
| -$ echo -e 'a\nb' | colines |
| 98 | +$ echo -e 'a\nb' | coat |
98 | 99 | a
|
99 | 100 | b
|
100 |
| -$ echo -e 'a\nb' | nl | colines |
| 101 | +$ echo -e 'a\nb' | nl | coat |
101 | 102 | 1 a
|
102 | 103 | 2 b
|
103 |
| -$ colines file1 file2.txt |
| 104 | +$ coat file1 file2.txt |
104 | 105 | line1 of file1
|
105 | 106 | line2 of file1
|
106 | 107 | ...
|
107 | 108 | line1 of file2
|
108 | 109 | line2 of file2
|
109 | 110 | ...
|
| 111 | + |
| 112 | +# 帮助信息 |
| 113 | +# 可以看到本人机器上实现代理的`cat`命令是GNU的实现。 |
| 114 | +$ coat --help |
| 115 | +Usage: cat [OPTION]... [FILE]... |
| 116 | +Concatenate FILE(s) to standard output. |
| 117 | + |
| 118 | +With no FILE, or when FILE is -, read standard input. |
| 119 | + |
| 120 | + -A, --show-all equivalent to -vET |
| 121 | + -b, --number-nonblank number nonempty output lines, overrides -n |
| 122 | + -e equivalent to -vE |
| 123 | + -E, --show-ends display $ at end of each line |
| 124 | + -n, --number number all output lines |
| 125 | + -s, --squeeze-blank suppress repeated empty output lines |
| 126 | + -t equivalent to -vT |
| 127 | + -T, --show-tabs display TAB characters as ^I |
| 128 | + -u (ignored) |
| 129 | + -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB |
| 130 | + --help display this help and exit |
| 131 | + --version output version information and exit |
| 132 | + |
| 133 | +Examples: |
| 134 | + cat f - g Output f's contents, then standard input, then g's contents. |
| 135 | + cat Copy standard input to standard output. |
| 136 | + |
| 137 | +GNU coreutils online help: <http://www.gnu.org/software/coreutils/> |
| 138 | +Full documentation at: <http://www.gnu.org/software/coreutils/cat> |
| 139 | +or available locally via: info '(coreutils) cat invocation' |
110 | 140 | ```
|
111 | 141 |
|
112 |
| -注:上面显示中,没有彩色,在控制台上运行可以看出彩色效果。 |
| 142 | +注:上面示例中,没有彩色;在控制台上运行可以看出彩色效果,如下: |
| 143 | + |
113 | 144 |
|
114 | 145 | :beer: [a2l](../a2l)
|
115 | 146 | ----------------------
|
|
0 commit comments