News for hackers. Stuff that matters.
Re:Actually using Ed by drostie on Saturday June 16, 2012 @09:51AM (#4120647)
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 trying to write a one-line program to reformat text documents and it suddenly makes a bit more sense.

Re:Actually using Ed by _delirium on Saturday June 16, 2012 @10:25AM (#4120718)
I used to use sed, but more recently I've been using 'perl -pe' instead, which is a drop-in replacement for the basic 's//' use I typically make of sed. The main reason is that I've had some performance problems with sed, depending on which of the several sed variants is installed. Many of them seem to have small fixed buffers that really limit throughput when processing large (multi-gigabyte) files, and the performance ends up being really unpredictable, while Perl's regex engine is fairly good and similar across platforms. (Also, I'm trying to avoid having to maintain both POSIX-style and PCRE-style regex syntax in different scripts, but that may be a matter of preference.)
Re:Actually using Ed by tyrmored on Saturday June 16, 2012 @03:01PM (#4121332)
Good old Perl Pie!