ed
Quick Reference
Command Name:
ed
Category:
file management
Platform:
Linux/Unix
Basic Usage:
Common Use Cases
- 1
Script-based editing
Edit files programmatically in shell scripts
- 2
Minimal environment editing
Edit text files in recovery or limited environments
- 3
Legacy system maintenance
Maintain compatibility with older Unix scripts and systems
- 4
Regular expression processing
Process text using powerful regular expressions
Syntax
ed [options] [file]
Options
Option | Description |
---|---|
-G |
Force backward compatibility with historic versions of ed |
-p string |
Specify a command prompt |
-r |
Use restricted mode (cannot execute shell commands) |
-s |
Suppress diagnostics (quiet mode) |
-v |
Verbose mode (displays file size and other information) |
Examples
How to Use These Examples
The examples below show common ways to use the ed
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.