2019-04-20 13:36:40 +08:00

22 lines
1.4 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="join">join</h1>
<p>两个文件中指定栏位内容相同的行连接起来</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>join命令</strong> 用来将两个文件中,制定栏位内容相同的行连接起来。找出两个文件中,指定栏位内容相同的行,并加以合并,再输出到标准输出设备。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">join(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-a&lt;1或2&gt;:除了显示原来的输出内容之外,还显示指令文件中没有相同栏位的行;
-e&lt;字符串&gt;:若[文件1]与[文件2]中找不到指定的栏位,则在输出中填入选项中的字符串;
-i或--ignore-case比较栏位内容时忽略大小写的差异
-o&lt;格式&gt;:按照指定的格式来显示结果;
-t&lt;字符&gt;:使用栏位的分割字符;
-v&lt;1或2&gt;:更-a相同但是只显示文件中没有相同栏位的行
-1&lt;栏位&gt;:连接[文件1]指定的栏位;
-2&lt;栏位&gt;:连接[文件2]指定的栏位。</code></pre>
<h3 id="参数">参数</h3>
<ul>
<li>文件1要进行合并操作的第1个文件参数</li>
<li>文件2要进行合并操作的第2个文件参数。</li>
</ul>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->