My Ed(1) Toolbox(aartaka.me)
aartaka.me
My Ed(1) Toolbox
https://aartaka.me/my-ed.html
27 comments
I don't use ed interactively but find it's really useful in shell scripts that need to edit files - heredocs or piping printf output (like one example in the article; never felt a need for something like his xed). Even used it in a C program via popen() to edit settings in a config file.
ed is underrated.
(I'm responsible for suggesting GNU ed accept posix EREs; think I got the idea from NetBSD's version)
ed is underrated.
(I'm responsible for suggesting GNU ed accept posix EREs; think I got the idea from NetBSD's version)
I like ed but I prefer 'sam -d' (the terminal mode of Sam). It has a nice looping construct 'x' and you can open multiple files and do batch edits (with 'X').
There is a Go port of Sam, which is easy to install:
go install 9fans.net/go/cmd/sam@latest
http://sam.cat-v.org/
There is a Go port of Sam, which is easy to install:
go install 9fans.net/go/cmd/sam@latest
http://sam.cat-v.org/
+1, structural regular expressions are a joy to use.
https://doc.cat-v.org/bell_labs/sam_lang_tutorial/sam_tut.pd...
Also interesting, with other derivates of ed -- LineEditorFamily in the TextEditors Wiki: https://texteditors.org/cgi-bin/wiki.pl?LineEditorFamily
https://doc.cat-v.org/bell_labs/sam_lang_tutorial/sam_tut.pd...
Also interesting, with other derivates of ed -- LineEditorFamily in the TextEditors Wiki: https://texteditors.org/cgi-bin/wiki.pl?LineEditorFamily
When even “IDEs are complete overkill—just use vi” sounds like weakness and the entitlement of modern youth, seek out the ed fan pages!
ed isn’t quite flipping binary toggle switches to load your program, but close enough to deliver the joy of brutal minimalism along with a nostalgic waft of yesteryear.
ed isn’t quite flipping binary toggle switches to load your program, but close enough to deliver the joy of brutal minimalism along with a nostalgic waft of yesteryear.
> ed isn’t quite flipping binary toggle switches to load your program, but close enough to deliver the joy of brutal minimalism along with a nostalgic waft of yesteryear.
No, that would be Teco, or, more “all we had were zeros”, ED on CP/M.ED is, well, miserable. It’s a character editor, vs a line editor, and you had the joys of paging in chunks of your file into working memory.
I, personally, find command line character editors especially difficult. I find it very hard to maintain my context and, of course, who doesn’t just love counting characters for commands.
Funny thing about ed: While it is still one of my most common commands, it is also my dad's name. So, I've spent my entire career regularly typing my father's name at work.
ed is the standard text editor!
https://www.gnu.org/fun/jokes/ed-msg.en.html
https://www.gnu.org/fun/jokes/ed-msg.en.html
Hilarious! WYGIWYG :-D
Is there really an advantage to using Ed instead of vim in any situation whatsoever? (Assuming you're totally comfortable with vim)
Very low bandwidth situations, or when you want to apply the same steps to other files afterwards.
But if you're totally comfortable with vim you'd better use ex, which basically is both an extension to ed, and the non-interactive part of vim.
But if you're totally comfortable with vim you'd better use ex, which basically is both an extension to ed, and the non-interactive part of vim.
Not to be that person, but… ex is not ed-compatible, and it made really bad choices too.
when you're using a teletype terminal
Forget it, you won't be able to be funnier than the 1991 TRUE PATH TO NIRVANA. This is unbeatable.
Wild implementing Ed in Brainfuck: https://github.com/bf-enterprise-solutions/ed.bf/blob/master...
Shorter than I would have imagined.
ed is the first program I put in exaequOS (https://exaequos.com), an OS fully running in the Web browser. For testing ed, you can open a terminal and type 'ed'
Aaron have a crossplatform ed in Apl.This is great when you familiar with apl.
After reading this article, I need to learn :wq for ed.
Edit - I suppose that shouldn't have been surprising:
w
q
Edit - I suppose that shouldn't have been surprising:
w
q
Both GNU ed and OpenBSD ed support wq as an extension to POSIX. But yeah, it all depends on whether you want to stick by POSIX or common practice. I personally prefer wq for interactive sessions and w\nq for scripts.
Vi comes from ex, which itself came from ed.
[deleted]
love it.
Still, teaching bash, C and the usual suspects along with ed was very strenuous for the students, and for me - we only ran the course once.