juechafun/05-原子化笔记本/Linux-sed命令说明.md
2026-01-14 21:37:35 +08:00

31 lines
453 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#领域/Linux
## 一句话描述
[__sed使用说明______]
## 核心定义
`sed` = **Stream Editor**(流式文本编辑器)
### 通用语法
```bash
sed [选项] '处理指令' 文件
```
| 选项 | 说明 |
| ------ | ---------- |
| -i | 写入文件 |
| -i.bak | 写出并备份bak文件 |
| -n | 静默输出被处理过的行 |
| | |
### 文本替换
```bash
sed 's/old/new/g' 文件
```