大网数据广告活动
Linux 与通用命令

ed · 常用命令示例

· 52CE 我爱测

The original Unix text editor. > See also: `awk`, `sed`. > More information: <https://www.gnu.org/software/ed/manual/ed_manual.html>.

ed

The original Unix text editor. See also: awk, sed. More information: https://www.gnu.org/software/ed/manual/ed_manual.html.

  • Start an interactive editor session with an empty document:

ed

  • Start an interactive editor session with an empty document and a specific prompt:

ed ''

  • Start an interactive editor session with user-friendly errors:

ed

  • Start an interactive editor session with an empty document and without diagnostics, byte counts, and '!' prompt:

ed

  • Start an interactive editor session without exit status change when command fails:

ed

  • Edit a specific file (this shows the byte count of the loaded file):

ed

  • [Interactive] Replace a string with a specific replacement for all lines:

,s///g

  • [Interactive] Exit ed:

q

来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
tldr-pages contributors
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。