Files
uTools-Manuals/docs/linux/ed.html
T
fofolee 38dcd51d8a v0.0.2
2019-04-21 11:50:48 +08:00

23 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="ed">ed</h1>
<p>单行纯文本编辑器</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>ed命令</strong> 是单行纯文本编辑器,它有命令模式(command mode)和输入模式(input mode)两种工作模式。ed命令支持多个内置命令,常见内置命令如下:</p>
<pre><code class="language-bash">A:切换到输入模式,在文件的最后一行之后输入新的内容;
C:切换到输入模式,用输入的内容替换掉最后一行的内容;
i:切换到输入模式,在当前行之前加入一个新的空行来输入内容;
d:用于删除最后一行文本内容;
n:用于显示最后一行的行号和内容;
w&lt;文件名&gt;:一给定的文件名保存当前正在编辑的文件;
q:退出ed编辑器。</code></pre>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">ed(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-G或——traditional:提供兼容的功能;
-p&lt;字符串&gt;:指定ed在command mode的提示字符;
-s---quiet或——silent:不执行开启文件时的检查功能;
--help:显示帮助;
--version:显示版本信息。</code></pre>
<h3 id="参数">参数</h3>
<p>文件:待编辑的文件。</p>
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->