ed: refresh/add pages (#7933)

* Update common/ed.md

* Create osx/ed.md

* Prefer `a specific`

* Fix quoting in common/ed

* Fix quoting in osx/ed
This commit is contained in:
Emily Grace Seville
2022-08-15 10:53:12 +10:00
committed by GitHub
parent b31a2dc305
commit e6fb17a014
2 changed files with 39 additions and 17 deletions

25
pages/osx/ed.md Normal file
View File

@@ -0,0 +1,25 @@
# 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 [p]rompt:
`ed -p '> '`
- Start an interactive editor session with an empty document and without diagnostics, byte counts and '!' prompt:
`ed -s`
- Edit a specific file (this shows the byte count of the loaded file):
`ed {{path/to/file}}`
- Replace a string with a specific replacement for all lines:
`,s/{{regular_expression}}/{{replacement}}/g`