[BusyBox] Sed and vi.
Rob Landley
rob at landley.net
Sat Oct 11 21:42:09 UTC 2003
On Saturday 11 October 2003 11:45, Wolfgang Denk wrote:
> In message <200310110119.01208.rob at landley.net> you wrote:
> > > > I think they might be ed commands, which is about the same as sed.
> > >
> > > You gess wrong. ed is not even nearly the same as sed.
> >
> > Today, no. Thirty years ago, they were almost exactly the same, having
> > derived from the same code base. (Filter out the gnu extensions and
> > they're a lot closer.)
>
> You are wrong again, and on both accounts: the commands are not even
> nearly the same, and the sources are very different. Feel free to
> check for example with the Unix Seventh Edition Manual at
> http://www.cs.bell-labs.com/7thEdMan/
Actually I was going by an old interview with Ken Thompson. I don't really
read troff. (I've helped debug doclifter to obsolete troff, but it was
mostly finding bugs and producing test cases).
However, http://www.cs.bell-labs.com/7thEdMan/vol2/sed says the purpose of sed
was:
> To edit any size file when the sequence
> of editing commands is too complicated to be comfortably
> typed in interactive mode.
...
> The principal loss of functions compared to an interactive editor
> are lack of relative addressing (because of the line-at-a-time
> operation), and lack of immediate verification that a command has
> done what was intended.
...
> Sed is a lineal descendant of the UNIX editor, ed. Because of the
> differences between interactive and non-interactive operation,
> considerable changes have been made between ed and sed;
> even confirmed users of ed will frequently be surprised (and probably
> chagrined), if they rashly use sed without reading Sections 2 and 3 of this
> document.
That paragraph may be what you're talking about, but it doesn't exactly imply
that it's useless to go looking for shared code, either.
On the other hand, I can't say I've ever actually USED ed. Bill Joy wrote vi
when I was 4 years old. (I did use edlin under dos. This is why I've never
tried ed.)
> Best regards,
>
> Wolfgang Denk
> [who used to run Unix 7th ed. on a PDP11 some decades ago]
Unix V7 came out in January, 1979. (I was just about to turn seven.) I've
studied it, but you've got me out-fogeyed here. :)
Rob
More information about the busybox
mailing list