DaemonForums  

Go Back   DaemonForums > Miscellaneous > Book reviews

Book reviews Reviews of books related to BSD and computing in general.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 4th October 2019
ripe's Avatar
ripe ripe is offline
Package Pilot
 
Join Date: Feb 2013
Location: France
Posts: 159
Default Ed Mastery

Ed Mastery
By Michael W Lucas

Mars 2018
ISBN-10 : 1642350036
ISBN-13 : 978-1642350036

Quote:
Let me be perfectly clear: ed(1) is the standard Unix text editor. If you don’t know ed, you’re not a sysadmin. You’re a mere dabbler. A dilettante. Deficient.

Forty years after ed’s introduction, internationally acclaimed author Michael W Lucas has finally unlocked the mysteries of ed for everyone. With Ed Mastery, you too can become a proper sysadmin.

Ed Mastery will help you:
• understand buffers and addresses
• insert, remove, and mangle text
• master file management and shell escapes
• comprehend regular expressions, searches, and substitutions
• create high-performance scripts for transforming files

You must be at least this competent to use this computer. Read Ed Mastery today!

“I’m glad someone’s finally giving ed the attention it deserves.”
– Ken Thompson, co-creator of Unix
Ed Mastery
Reply With Quote
  #2   (View Single Post)  
Old 4th October 2019
ripe's Avatar
ripe ripe is offline
Package Pilot
 
Join Date: Feb 2013
Location: France
Posts: 159
Default

I discovered ed(1) by reading the topic Help with doas.conf OpenBSD 6.5 (thanks!).
Ed Mastery is a very good book to learn ed(1). Lucas explained very well how to use it: command, regex (regular expression), search, substitution, with scripting... step by step new informations are given to mastery ed, like this it is more easy to understand, it is uncomplexity. I know I have to pratice ed. Reading this book was an adventure I enjoy!
Like Ken Thompson said: “I’m glad someone’s finally giving ed the attention it deserves.”
Plus I like his writing style, his humor and his knowledge, I need another Lucas's books now ahah!!!
Reply With Quote
  #3   (View Single Post)  
Old 5th October 2019
frcc frcc is offline
Don't Worry Be Happy!
 
Join Date: Jul 2011
Location: hot,dry,dusty,rainy,windy,straight winds, tornado,puts the fear of God in you-Texas
Posts: 252
Default

It does come in handy at times.
I find it installed in base systems almost always.
Back, in the day on many main frames, it was the "only" editor.
It does stimulate the brain, in that it does make thinking ahead a bit of a pleasure.
In addition it has a very small footprint.
Reply With Quote
  #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: 306
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
  #5   (View Single Post)  
Old 6th October 2019
frcc frcc is offline
Don't Worry Be Happy!
 
Join Date: Jul 2011
Location: hot,dry,dusty,rainy,windy,straight winds, tornado,puts the fear of God in you-Texas
Posts: 252
Default

One of my favorite quote's from https://www.gnu.org/fun/jokes/ed-msg.html
"Ed is for those who can remember what they are working on."


But Seriously!
My 2 cents
Ed facilitates and enhances the ability of one to "focus" on the "line" of code they are working on!

Back in the day - When ANSI certifying Power Plant Simulation Code Response to a multitude of failure testing, I thought Ed was superb for that purpose.

(That was 25-30 yrs ago, don't know or care what they use today)

Last edited by frcc; 6th October 2019 at 01:01 PM. Reason: add/clarify
Reply With Quote
  #6   (View Single Post)  
Old 7th October 2019
ripe's Avatar
ripe ripe is offline
Package Pilot
 
Join Date: Feb 2013
Location: France
Posts: 159
Default

Quote:
Originally Posted by frcc View Post
It does stimulate the brain, in that it does make thinking ahead a bit of a pleasure.
In addition it has a very small footprint.
Yes!
Cool!

fvgit, this quote is funny ahah!!!
Reply With Quote
  #7   (View Single Post)  
Old 8th October 2019
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 631
Default

Mike Lucas. $5.00 (many bills right now so can't give extra appreciation donation but)

Already downloaded. Thanks, as always. Mr. Lucas.
Reply With Quote
  #8   (View Single Post)  
Old 1 Week Ago
Omphalotus_japonicus Omphalotus_japonicus is offline
New User
 
Join Date: Jan 2021
Posts: 5
Default

I read a document of this book a while ago as an introduction to the ed(itor), and I thoroughly enjoyed reading it, especially in a world where most manuals aren't fun to read, for whatever reason. I still actively use ed for text editing, as the inherent challenge that comes with it gives a sense of satisfaction--though I can't say it's very good for writing.
Reply With Quote
  #9   (View Single Post)  
Old 1 Week Ago
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 631
Default

Yes, Mr. Lucas's books are always fun. For example, his list that starts with something Fight capitalism and he decides to change it to Obliterate capitalism. (I might have it slightly wrong). And as the whole book is saying, those newbies who need a terminal or newbie hand-holding with vi.
Honestly, I'm impressed that you use ed. A lot of his book shows that it many ways, the syntax of commands and search is much like vi, but of course, only one line at a time. Vs. vim.
For example, the other day I did an install of almalinux. Its default vimrc is so full of tricks, I found it almost unusable. For example did a word search, find the word, hit escape and it goes back to line one of the file. (Finally just renamed its global vimrc to VIMBS and then I could work with it.)
Sorry, just wanted to complain. Anyway, to go return from my fun (for me) digression, I agree it's not very good for writing, but youi should be proud of youirself that you use it. I'm impressed.
Reply With Quote
Old 6 Days Ago
bsdun bsdun is offline
Real Name: Steve
Fdisk Soldier
 
Join Date: Feb 2020
Posts: 48
Default

Quote:
Originally Posted by scottro View Post
...
For example, the other day I did an install of almalinux. Its default vimrc is so full of tricks, I found it almost unusable. For example did a word search, find the word, hit escape and it goes back to line one of the file. (Finally just renamed its global vimrc to VIMBS and then I could work with it.)
...
I would be very interested in studying the contents of Almalinux vimrc. If you still have it, could you please attach it to a message or post it's contents here, or send me it in a private message?
Reply With Quote
Old 6 Days Ago
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 631
Default

Sure, I still have it saved as VIMBS. (I'm petty, that way), I'll post it for you shortly
Reply With Quote
Old 6 Days Ago
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 631
Default

Tried to attach it, but the forum told me it was invalid. (I suspect I did something wrong.)
I've uploaded it, you can get it from
https://srobb.net/almavimrc
Reply With Quote
Old 6 Days Ago
J65nko J65nko is online now
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,819
Default

Quote:
Originally Posted by scottro View Post
Tried to attach it, but the forum told me it was invalid. (I suspect I did something wrong.)
The forum software foolishly insists that the attachments have an approved valid file extension.These are
Code:
bmp bz2 c cnf conf cpp css diff gif gz h hpp html
jpeg jpg patch pdf php pl png ps py rb sgml sh shar
svg t2t tar tbz tgz txt vim xcf xsl xslt xwd zip
IMHO this are clearly listed in the box "Attach files"

PS I downloaded the file, gave it the extension .txt and attached it without any problem .....
Attached Files
File Type: txt almavimrc.txt (3.9 KB, 5 views)
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump

Last edited by J65nko; 6 Days Ago at 12:07 AM.
Reply With Quote
Old 5 Days Ago
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 631
Default

Like I said, I probably did something wrong, and sure enough I did. I didn't put a txt extension. In fairness to myself., it was just as easy to upload it to my website, so when it didn't upload, I just shrugged and uploaded. I didn't even look at the note about legit extensions.
Reply With Quote
Old 5 Days Ago
bsdun bsdun is offline
Real Name: Steve
Fdisk Soldier
 
Join Date: Feb 2020
Posts: 48
Default

Quite interesting vimscript there, thanks!
Reply With Quote
Old 4 Days Ago
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 631
Default

My pleasure.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Security DNSSEC Mastery ocicat News 4 13th June 2013 03:27 AM


All times are GMT. The time now is 02:13 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick