5 ms·
There's no reason to use ed. It's a historical novelty at this point. Move on.
by legalcorrection 4y ago
There's no reason to use ed. It's a historical novelty at this point. Move on.
- Koshkin 4y agoed is surprisingly usable (and useful, and fun to use), you should try it. > no reason This is like saying "There is no reason to use UNIX (now that we have Ubuntu, Gnome, and Wayland)." Personally, I tend to stick with the CLI for as long as it gets me where I need.
- Blackthorn 4y agoLPMUD's online editor comes with a reasonable implementation of ed. It's actually the only way to edit files in the MUD environment (and as a result, how I learned ed).
- totetsu 4y agoWasnt there a way to change your editor in discworld? Maybe they use very customized lpmud
- NoGravitas 4y agoDiscworld is a very customized lpmud, though there are other muds also based on Discworld's core code ("driver"). The default editor on Discworld wasn't ed, but a simpler, less-powerful line editor. ed was available as an option, though, last I checked (last time I logged in was when Pterry died, and then I hadn't logged in for years).
- macintux 4y agoDitto, learned ed and C that way. Tried again recently but quickly switched to editing files remotely.
- xenophonf 4y agoIt's a handy tool for scripting certain kinds of file editing operations. It's also good for editing files over remote management connections that don't implement a proper terminal interface. As with a lot of the Unix CLI, it may not be something you use frequently (or ever), but it's a godsend when you need it.
- 0x69420 4y ago"oh no i reinstalled the os on my vps and now ssh has it on good authority (said authority is line 68) that someone is doing something nasty" ed .ssh/config 68d wq done, didnt fill my terminal with vim or emacs, didnt tab over to my gui editor then back again also it's a nicely "semantic"/compact/comprehensible way of expressing patches in things like portfiles or nix expressions: postPatch = '' ed Makefile <<EOF /^CFLAGS/s/-DFOO// /-funroll-loops/s//-ffast-math/ /_BSD_SOURCE/s//_DEFAULT_SOURCE/ /^LDFLAGS/d /ranlib/s,,${pkgs.my_special_epic_ranlib}/bin/ranlib, wq EOF ''; etc etc sure, using ed as your daily driver code editor in 2022 is probably stupid, but it's still useful enough that any linux distro that excludes it by default irritates me
- bitwize 4y agoNow that Visual Studio Code has remote edit, you can do all that in a nice, modern way :)
- w0m 4y agoRemote Edit requires installing a node server to connect to. That would crash my router.
- fmakunbound 4y ago> ed .ssh/config I think this is my ed use-case as well. I've noticed I need to "apt-get install ed" sometimes. The standard editor is not always standard, it seems.
- 0x69420 4y agoyeah, unfortunately, despite literally being specified in posix (hell, macos bundles it) one of these days i will go around pestering distro release engineers to include it; after all, it's less heavyweight than any one of their homespun lightdm greeters
- mananaysiempre 4y ago
- memorable 4y agoWhat about sed? That thing is still useful and far more commonly used than ed.
- shakna 4y agopatch can export to ed-scripts. So that you can bundle creation and editing into your builds, and installers and all sorts, because you can depend on ed existing.
- kabdib 4y agoI still use /bin/ed over vi. Seriously. (And then install Emacs and turn off the screen candy fluff they've added over the last 25-30 years).