Ed Mastery (Manly McManface Edition)
()
About this ebook
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!
This special edition exists for the people who believe that women don't belong in technology books. Any third-person singular pronouns that appear in the standard edition, for normal people, are female. Those who believe that women don’t belong in tech books may purchase this special “Manly McManface” edition, where all third-party singular pronouns are masculine.
To compensate for this edition’s much smaller market, though, the Manly edition is "unfortunately" pricier than the standard edition. That’s basic economics.
Also, one dollar of the author's proceeds from each sale of the Manly McManface Edition will be donated to his local chapter of Soroptimists International.
Michael W. Lucas
Michael W Lucas lives in Detroit, Michigan. He is the author of several critically-acclaimed nonfiction books and assorted short stories. His interests include martial arts and Michigan history.
Read more from Michael W. Lucas
Cash Flow for Creators: How to Transform Your Art Into A Career Rating: 0 out of 5 stars0 ratingsAbsolute OpenBSD, 2nd Edition: Unix for the Practical Paranoid Rating: 4 out of 5 stars4/5Cisco Routers for the Desperate, 2nd Edition: Router Management, the Easy Way Rating: 5 out of 5 stars5/5Domesticate Your Badgers: Become a Better Writer through Deliberate Practice Rating: 0 out of 5 stars0 ratingsAbsolute FreeBSD, 3rd Edition: The Complete Guide to FreeBSD Rating: 5 out of 5 stars5/5Network Flow Analysis Rating: 3 out of 5 stars3/5Dear Abyss: The FreeBSD Journal Letters Column, years 1-6 Rating: 0 out of 5 stars0 ratings
Related to Ed Mastery (Manly McManface Edition)
Related ebooks
Ed Mastery: IT Mastery, #13 Rating: 0 out of 5 stars0 ratingsOpenBSD Mastery: Filesystems: IT Mastery, #19 Rating: 0 out of 5 stars0 ratingsFreeBSD Mastery: Jails: IT Mastery, #15 Rating: 5 out of 5 stars5/5FreeBSD Mastery: Storage Essentials: IT Mastery, #4 Rating: 0 out of 5 stars0 ratingsSudo Mastery: IT Mastery, #13 Rating: 0 out of 5 stars0 ratingsDocker Deep Dive.: Zero to Docker in a Single Book Rating: 0 out of 5 stars0 ratingsNetworking for System Administrators: IT Mastery, #5 Rating: 5 out of 5 stars5/5Linux: A complete guide to Linux command line for beginners, and how to get started with the Linux operating system! Rating: 0 out of 5 stars0 ratingsUnix / Linux FAQ: with Tips to Face Interviews Rating: 0 out of 5 stars0 ratingsFreeBSD Mastery: Specialty Filesystems: IT Mastery, #8 Rating: 0 out of 5 stars0 ratingsRelayd and Httpd Mastery: IT Mastery, #11 Rating: 0 out of 5 stars0 ratingsBSD UNIX Toolbox: 1000+ Commands for FreeBSD, OpenBSD and NetBSD Rating: 0 out of 5 stars0 ratingsPAM Mastery: IT Mastery, #10 Rating: 0 out of 5 stars0 ratingsSNMP Mastery: IT Mastery, #15 Rating: 0 out of 5 stars0 ratingsFreeBSD Mastery: Advanced ZFS: IT Mastery, #9 Rating: 0 out of 5 stars0 ratingsTarsnap Mastery: IT Mastery, #6 Rating: 0 out of 5 stars0 ratingsGetting Started with tmux Rating: 0 out of 5 stars0 ratingsLighttpd Rating: 4 out of 5 stars4/5TLS Mastery: Tux Edition: IT Mastery, #16 Rating: 0 out of 5 stars0 ratingsClojure Programming Fundamentals: A Concise Guidebook Rating: 0 out of 5 stars0 ratingsThe Shellcoder's Handbook: Discovering and Exploiting Security Holes Rating: 0 out of 5 stars0 ratingsContainerization with LXC Rating: 0 out of 5 stars0 ratingsCoreOS in Action: Running Applications on Container Linux Rating: 0 out of 5 stars0 ratingsDNSSEC Mastery, 2nd edition: IT Mastery, #18 Rating: 0 out of 5 stars0 ratingsMachine Learning with Rust Rating: 0 out of 5 stars0 ratingsMastering macOS Programming Rating: 0 out of 5 stars0 ratingsPython AI Programming Rating: 0 out of 5 stars0 ratingsLinux Command Line and Shell Scripting Bible Rating: 3 out of 5 stars3/5Learning ClojureScript Rating: 0 out of 5 stars0 ratings
System Administration For You
Cybersecurity: The Beginner's Guide: A comprehensive guide to getting started in cybersecurity Rating: 5 out of 5 stars5/5Ethical Hacking Rating: 4 out of 5 stars4/5Wordpress 2023 A Beginners Guide : Design Your Own Website With WordPress 2023 Rating: 0 out of 5 stars0 ratingsMastering Bash Rating: 5 out of 5 stars5/5Learning Nagios 4 Rating: 5 out of 5 stars5/5Learn PowerShell Scripting in a Month of Lunches Rating: 0 out of 5 stars0 ratingsGit Essentials Rating: 4 out of 5 stars4/5Practical Data Analysis Rating: 4 out of 5 stars4/5Learn Windows PowerShell in a Month of Lunches Rating: 0 out of 5 stars0 ratingsCybersecurity Architect's Handbook: An end-to-end guide to implementing and maintaining robust security architecture Rating: 0 out of 5 stars0 ratingsGetting Started with Kubernetes - Second Edition Rating: 0 out of 5 stars0 ratingsLearning Linux Shell Scripting Rating: 4 out of 5 stars4/5Linux Bible Rating: 0 out of 5 stars0 ratingsLinux Shell Scripting Cookbook - Third Edition Rating: 4 out of 5 stars4/5CompTIA Linux+ and LPIC Practice Tests: Exams LX0-103/LPIC-1 101-400, LX0-104/LPIC-1 102-400, LPIC-2 201, and LPIC-2 202 Rating: 0 out of 5 stars0 ratingsWindows Server 2016 Cookbook Rating: 0 out of 5 stars0 ratingsBash Command Line Pro Tips Rating: 5 out of 5 stars5/5Docker in Action, Second Edition Rating: 3 out of 5 stars3/5Design and Build Modern Datacentres, A to Z practical guide Rating: 3 out of 5 stars3/5DevOps Bootcamp Rating: 0 out of 5 stars0 ratingsDevOps: Introduction to DevOps and its impact on Business Ecosystem: Introduction to DevOps and its impact on Business Ecosystem Rating: 0 out of 5 stars0 ratingsSpring Batch in Action Rating: 0 out of 5 stars0 ratingsThe Complete Powershell Training for Beginners Rating: 0 out of 5 stars0 ratingsCompTIA Network+ Certification Guide: The ultimate guide to passing the N10-007 exam Rating: 0 out of 5 stars0 ratingsMastering Linux Shell Scripting Rating: 4 out of 5 stars4/5Thomson Electrac HD Linear Actuator Motion Control per CAN Bus Rating: 0 out of 5 stars0 ratingsDjango 5 Cookbook Rating: 0 out of 5 stars0 ratings
Reviews for Ed Mastery (Manly McManface Edition)
0 ratings0 reviews
Book preview
Ed Mastery (Manly McManface Edition) - Michael W. Lucas
Acknowledgements
My entire career—indeed, modern life for every one of us—would not have been possible without those giants who wrote entire operating systems using ed and its predecessors. We owe those giants a debt of gratitude.
More personally, though, I want to thank my technical reviewers who were kind enough to share their immense edpertise: Tim Chase, Josh Grosse, and Kurt Mosiejczuk. Any errors in this book crept in despite these fine folks’ best efforts.
Many examples in this book were inspired by the fine presentations at the ed(1) Conference, available on Twitter at https://twitter.com/ed1conf and on Mastodon at https://bsd.network/@ed1conf. Attending the world’s premier conference for text editing at 300 baud will help keep your ed skills razor-sharp.
After receiving rare but tediously ongoing complaints about mixed male and female third-person pronouns in technology books, the author has prepared two editions of this book. Any third-person singular pronouns that appear in the standard edition, for normal people, are female. Those who believe that women don’t belong in tech books are welcome to purchase this special Manly McManface
edition, where all third-party singular pronouns are masculine. To compensate for this edition’s much smaller market, though, the Manly edition is pricier than the standard edition. That’s basic economics.
Also, one dollar of the author’s proceeds from each sale of the Manly McManface Edition will be donated to his local chapter of Soroptimists International.
Chapter 0: Introduction
Let me be very clear here: ed(1) is the standard Unix text editor.
Dennis Ritchie, co-creator of Unix, declared it so. Who are you to argue with someone who can write a complete operating system without using a glass teletype?¹
Many younger sysadmins naively hoist their pennants to defend overblown, overwrought, overdesigned text editors like ex, vi, or even the impossibly bloated nvi. A few are so lost as to devote themselves to turgid editors meant for mere users, such as vim and Emacs. This way lies not only appalling sysadmin skills, but an absence of moral fiber. As a sysadmin, you must have enough brain power to remember what you typed, to hold your own context in your head, and to truly commune with the machine on a deep and personal level.
Most Unix hosts exist to perform real work, such as supporting databases or serving web pages. When you specced out the system’s memory, processor, and disk I/O, you considered the amount of hardware needed to run those tasks. Any system resources above that are intended to support atypical peak loads, not some pathetically overengineered text editor. When you suck up extra kilobytes—or, worse, megabytes—to run a fancy editor, you steal from the host.
Sysadmins dependent on something like vim? They actively harm systems. Do not trust them.
For a random user, there’s no shame in being unable to use ed. I’m not qualified to become a Navy SEAL. I’m not even qualified to become the kind of seal that lies on a beach and barks. That’s okay. The world is full of computers. If you cannot handle the undiluted glory that is ed, use one of those friendly pointy-clicky systems. You’re who they exist for. I recommend those tablet computers that don’t have a keyboard, though, as those bright, colorful icons are very helpful to the non-educatable.
It’s not that using ed(1) is the pinnacle of systems administration achievement; it’s the minimum requirement. You must be this competent to manage this computer.
If you’re reading this book, it’s because you want to join the elite. You want to count amongst the Navy SEALS of information technology. You want to be a real sysadmin, not one of those posers that need fancy toys like a monitor.
Yes, I own monitors, but only because these wimpy modern laptops don’t come with built-in line printers.
Real sysadmins not only can work, they truly thrive on their wits and line printers alone. We welcome anyone who proves worthy of joining us.
This book covers standard ed. Many operating system developers can’t resist the urge to add additional features to ed. That’s how the tragedies of ex and vi happened, after all. While these developers’ urge to become part of something as momentous as ed is perfectly understandable, ed is feature complete. This book won’t cover OS-specific extensions, such as Linux’s x and y commands and FreeBSD’s encryption support.²
I should warn you, though: some sysadmins object to this book. They sincerely believe that the best sysadmins learn from studying the operating system source code or, at worst, reading the man page. Many of those folks forget their own youth, though. You can’t learn computing on your own. Even the most sagacious Unix admins had mentors.
In this bleak age when search engine algorithms dredge up shoddily-assembled HOWTOs and pass them off as authoritative documents, providing for the next generation of sysadmins is one of the most vital tasks we face as a profession. I don’t want the servers storing my retirement funds managed by so-called sysadmins who struggle against the pomposity of ex(1). Study