Date: Thu, 10 Sep 1998 07:07:35 -0600 From: Wes Peters <wes@softweyr.com> To: "Jordan K. Hubbard" <jkh@time.cdrom.com> Cc: freebsd-chat@FreeBSD.ORG Subject: Re: ed Message-ID: <35F7CF17.E0C82BCA@softweyr.com> References: <9698.905291210@time.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Jordan K. Hubbard wrote: > > > Ugh. I wouldn't go so far as to say it's a favorite, but I still use > > it for quick editing tasks where you need to change one string to > > another, and in shell scripts. > > Actually, I wasn't really joking, and though it's certainly true that > I use ed pretty rarely (usually when I'm in a situation where my > terminal settings or current emulator are too braindead for vi), I > still really like it for its concise-yet-powerful approach to editing. > > The problem most people have with ed(1) is that they don't have enough > context to compare it to OTHER line editors, something which I > unfortunately have in spades. Yeah, me too. Those who think ed is bad should try, for instance, that horrid editor that came with CP/M, or "sos" on TOPS-10. Or, as an example of something other FreeBSD'ers MAY have seen, edlin. Remember that barfluous little botch? > Those who started with vi and then perhaps went on to emacs just have > no perspective on what something like ed(1) represents. :-) It was and is probably the best line editor ever written. Driving home last night I recalled a recent use of ed, one that is too common in my life. About every 14 months lately I change jobs, usually because my employer has been bought by someone and the whole management structure and tempo changes. Since I'm usually the "Alpha Geek" at work, I usually get the ugly job of changing the company name in all the comment headers, startup prompts, etc. for file in `find . \( -name '*.[ch] -o -name Makefile \) -print` do ed $file <<EOF 1,$s/Good Time Engineering/Mega Baby Bell/g w q EOF echo $file edited. done You type this in, and depending on the size of your product(s), leave for lunch or the night. When you get back, all of your source files have been updated (to the rear, it seems) and you can quietly find a new job. ;^) (I used to work for Good Time Engineering, but left long before this merger.) -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC http://www.softweyr.com/~softweyr wes@softweyr.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35F7CF17.E0C82BCA>