On Sunday 24 March 2002 13:19, Colm MacCarthaigh wrote:
> On Sun, Mar 24, 2002 at 12:08:24PM +0000, John Allen wrote:
> > No, sed is a specialisation of grep
>> eh, you're both quiet mad. sed is the stream editor. It has
> nothing to do with grep, apart from their common ability to
> work on streams I guess. But that makes grep a specialisation
> of cat.
Historically, both sed and grep are offspring of ed, the venerable
Unix command-line-based text editor.
Grep is the functionality of the "g/re/p" command
in ed (with re replaced by a regex) split out into its own command
- that's globally / match this regex / print line
sed, (stream-ed) is an ed variant that operates on streams instead of files -
the command set is pretty similar.
Other trivia:
ex was a command-line text editor written by a certain William Joy while
at Berkely, with a superset of ed's commands.
vi was an enhanced version of ex, with an amazing new "visual editing mode"...
These days, people think of it the other way round, with ex being a funny
ed-like mode of vi, but ex came first.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!