ed Cheatsheet

· 143 words · 1 minute read

ed : The original Unix text editor.

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

See also: awk , sed .

For more info, check its GNU manual: https://www.gnu.org/software/ed/manual/ed_manual.html .

I hope this post helps you. If you know a person who can benefit from this information, send them a link of this post. If you want to get notified about new posts, follow me on YouTube , Twitter (x) , LinkedIn , Facebook , Telegram and GitHub .

Share: