I'm glad ed is there. I'm glad articles like this are there. But there is no way I'll have retained that article in the moment my terminal has borked and I actually need ed. I wish that something like this available in the man pages, or something like them, or at least referred to in them. Because maybe I'm not clever enough but I don't find the man page articles to be very good introductions. As reminders of syntax…
Actually using Ed
31–40 of 92 posts
Re: Actually using Ed
#32That was a good explanation. I hope never to have to use ed.
Re: Actually using Ed
#33Re: Actually using Ed
#34If you’re using any Unix at all, then ed really will always be there, no matter how old or limited the system. So as it turns out, my Arch Linux setup does not actually have ed.
In my experience, the closest approximation of an editor which will always be there in the real world is sed, not ed.
Re: Actually using Ed
#35Earlier quoted context omitted.
It is a very sad and distressing trend that some Linux distros don't include ed in their base systems. Ed is as essential to a Unix system as cat or grep.
Why? We have better alternatives, and clearly things can work without it.
It also appears to be part of POSIX.
I imagine though that ex would be the more capable alternative, and since vi is also ubiquitous, I guess that makes ex ubiquitous too. So I can see your point.
Re: Actually using Ed
#36To everybody's surprise, the machines did turn back on, but they couldn't connect to the network because a few configuration files were wrong. To our dismay, after we tried to use Vi to edit the first one, we discovered that the ESC key did not work anymore, and we were stuck in edit mode forever! We had to reboot the machine, which takes about an hour on these old machines.
And then of course I configured the files using Ed and saved the day! Surprisingly, I was the youngest programmer there and I was the only one who knew how to use it.
Re: Actually using Ed
#37Earlier quoted context omitted.
It is a very sad and distressing trend that some Linux distros don't include ed in their base systems. Ed is as essential to a Unix system as cat or grep.
Why? We have better alternatives, and clearly things can work without it.
Even if you prefer vi for interactive edits, I still prefer ed for small edits.
Then there are times when your terminal is borken (or as somebody mentioned, perhaps even your keyboard is broken), this still happens more often than you think.
Recently I had to use some ajax-term thing which was just awful and completely unable to run vi properly for who knows what reason, anything that depends on curses can not be considered reliable.
But more importantly it is the standard and portable tool for scripting the editing of files.
Re: Actually using Ed
#38I use ed frequently for writing quick scripts. Its edge is that you can use it while retaining visual history of the prompt. Though, you could instead just redirect cat to a file and then do any tidy-up in your usual editor. It's also sometimes useful when you're in a remote system that is behaving strangely due to screwed-up terminal definitions or some other catastrophe. I'd be interested to read a sam tutorial foc…
Yes, I'm a user of ed regularly as well when I would like to mingle interacting with it with my other before and after command line use. If you use vim then `:set t_ti= t_te=' may be of interest to stop it switching to the terminal's other buffer and back; that way on exiting the file's content remains to copy-and-paste from. The article was OK. I'm not sure it mentioned addressing line 0 for the start of the file, a…
Re: Actually using Ed
#39Think of it: One day, every year, there should be a "Use ed (the standard editor) day". On that day, all your text editing must happen with 'ed'. Who's with me?
Re: Actually using Ed
#40I'm glad ed is there. I'm glad articles like this are there. But there is no way I'll have retained that article in the moment my terminal has borked and I actually need ed. I wish that something like this available in the man pages, or something like them, or at least referred to in them. Because maybe I'm not clever enough but I don't find the man page articles to be very good introductions. As reminders of syntax…
OpenBSD has probably the best Unix manual pages:
http://www.openbsd.org/cgi-bin/man.cgi?query=ed
And Plan 9 has a manual that is a pleasure to read, this is helped in part because the commands themselves have been cleaned up and simplified in many cases: