Thread: Ed Mastery
View Single Post
  #4   (View Single Post)  
Old 5th October 2019
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 238
Default

I haven't read the book, but I've become a big fan of ed for the simple fact that it's included in the OpenBSD base system and that it allows you to perform scripted file edits. I wasn't aware that you can do that until I came across this blog post by solene@ which pointed me in the right direction:
https://dataswamp.org/~solene/2018-1...n-diff-ed.html
Since then ed has become my favourite system administration tool. I make heavy use of it in my now 2500 line long /install.site

Quote:
Let's look at a typical novice's session with the mighty ed:

golem$ ed

?
help
?
?
?
quit
?
exit
?
bye
?
hello?
?
eat flaming death
?
^C
?
^C
?
^D
?

---

Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity.
https://www.gnu.org/fun/jokes/ed-msg.html
Reply With Quote