2019-04-21 11:50:48 +08:00

13 lines
1.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="col">col</h1>
<p>过滤控制字符</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>col命令</strong> 是一个标准输入文本过滤器它从标注输入设备读取文本内容并把内容显示到标注输出设备。在许多UNIX说明文件里都有RLF控制字符。当我们运用shell特殊字符<code>&gt;</code><code>&gt;&gt;</code>把说明文件的内容输出成纯文本文件时控制字符会变成乱码col命令则能有效滤除这些控制字符。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">col(选项)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-b过滤掉所有的控制字符包括RLF和HRLF
-f滤掉RLF字符但允许将HRLF字符呈现出来
-x以多个空格字符来表示跳格字符
-l&lt;缓冲区列数&gt;预设的内存缓冲区有128列用户可以自行指定缓冲区的大小。</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->