Alright, so today I’m gonna walk you through my little adventure with ed ott. You know, that command-line editor? I figured it’s time to dust off some old-school skills and see what this thing is all about.

First off, I installed it. Simple enough, right? I’m on a Debian-based system, so it was just a quick sudo apt-get install ed
. Boom. Done. Now, staring at the terminal, I typed ed
and hit enter. Got that blank screen and the blinking cursor. Felt like I was back in the ’70s or something.
Okay, so I wanted to create a file. After a little digging, I learned that the e
command is what you use to “edit” a file – which, in ed-speak, means open it, or create it if it doesn’t exist. So, I typed e *
. Then, I hit ‘a’ to append text. I started typing some random stuff: “Hello, world! This is ed in action. It’s… interesting.” When I was done adding lines I pressed enter and then just a ‘.’ on a new line, this took me a bit to remember. This ‘.’ tells ed to stop appending and go back to command mode.
Now, saving. That’s where it got a bit tricky, I had to look this up to be honest. Turns out you use w
to write (save) the file. So, w
, hit enter, and it tells you how many characters you wrote. Cool, the file is saved. I was curious, so I wanted to quit. Used q
, hit enter and then if you have not saved it, it complains, type it again to quit without saving. Then I thought, let me try to modify it. So, e *
again, and I see my text there.
Deleting lines was next on my list. The d
command is the key. First, you have to tell it which line(s) to delete. I typed 1d
to delete the first line. Hit enter, and poof, it’s gone. You can also do ranges, like 1,3d
to delete lines 1 through 3. I played around with that a bit.
Replacing text? Okay, this one took me a minute to wrap my head around. It’s the s
command – short for “substitute.” The format is s/old/new/
. For example, to change “Hello” to “Goodbye,” I’d type s/Hello/Goodbye/
and hit enter. Now it only substitutes in the first line, to substitute everywhere, you need to type s/Hello/Goodbye/g
which means apply to every line.

I spent a little time just messing around, adding lines, deleting them, changing stuff. It’s clunky, for sure, especially coming from modern editors with all their fancy features. But there’s something kind of cool about it too. It forces you to really think about what you’re doing.
Finally, I decided to try something a little more complex. I copied a small chunk of code into the file and tried to format it a bit using ed. That… was not fun. It’s definitely not designed for that kind of thing. Indenting and moving lines around was a real pain.
So, the verdict?
- ed is definitely a tool of a bygone era.
- It’s not something I’d use for everyday editing.
- But it’s interesting to learn, and it gives you a new appreciation for the editors we have today.
- Plus, it might come in handy someday if I’m stuck on a system with nothing else available.
Would I recommend learning ed? Maybe not as a priority. But if you’re a tech history buff, or just looking for a quirky challenge, give it a shot. You might be surprised what you learn.
That’s pretty much it. My ed adventure for the day. Until next time!
