When I set out to learn ed, I was surprised that it was not included by default on my Arch Linux install. It was easy enough to add via Pacman but it still surprised me.
Actually using Ed
11–20 of 92 posts
Re: Actually using Ed
#12"ed really will always be there" When I set out to learn ed, I was surprised that it was not included by default on my Arch Linux install. It was easy enough to add via Pacman but it still surprised me.
Ed is as essential to a Unix system as cat or grep.
Re: Actually using Ed
#13Re: Actually using Ed
#14I 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…
The article was OK. I'm not sure it mentioned addressing line 0 for the start of the file, and comma is more common than % for all lines. ed(1) is brief and lots can be learned from it.
As for structural regular expressions as used in sam(1), see Rob Pike's paper. http://doc.cat-v.org/bell_labs/structural_regexps/
Re: Actually using Ed
#15Re: Actually using Ed
#16That was a good explanation. I hope never to have to use ed.
You may occasionally want to use its little brother, `sed`, which has substantially similar syntax. It is often the case in Unix programming that you have a pipe full of text data and you would like to transform every line of it; `sed` allows you to write these transforms into one line of instructions on the console line. So it may sound crazy that you have all of these terse commands, but just imagine that you're tr…
Re: Actually using Ed
#17http://www.catonmat.net/blog/ed-unix-text-editor-cheat-sheet...
And here is the cheat sheet itself:
pdf: http://www.catonmat.net/download/ed.text.editor.cheat.sheet....
txt: http://www.catonmat.net/download/ed.unix.text.editor.cheat.s...
doc: http://www.catonmat.net/download/ed.text.editor.cheat.sheet....
Re: Actually using Ed
#18If 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.
If you’re using any Unix at all, then ed really
will always be there, no matter how old or limited
the system. Well, unless you use Arch Linux, anyway.Re: Actually using Ed
#19Re: Actually using Ed
#20"ed really will always be there" When I set out to learn ed, I was surprised that it was not included by default on my Arch Linux install. It was easy enough to add via Pacman but it still surprised me.
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.