freebsd at edvax.de
Mon Apr 1 10:28:14 UTC 2019
On Sat, 30 Mar 2019 10:56:40 -0400, Lowell Gilbert wrote:
> Polytropon <freebsd at edvax.de> writes:
> > I think you're confusing vi and ex here (which are the same
> > executable), but ed is something different (a different program).
> > But I think the reason for this confusion is that using ed
> > feels like using vi's ex mode or the ex standalone program. :-)
> Yes, definitely.
> Because it's described by POSIX, ed(1) is with us to stay. Because it
> has non-trivial differences between POSIX and BSD versions (which have
> bitten me in the past), I use sed(1) regardless of whether ed would have
> done the job. I suspect that is a common pattern.
I think the aspect of POSIX-compliance is one of the main reasons
that so many "old-fashioned" programs still exist in default
installs of many UNIXes. UNIX books which cover UNIX in general,
instead of concentrating on one specific Linux version, still
often cover those "legacy tools". Yes, I just checked two:
Wolfinger, Christine: Keine Angst vor UNIX. Ein Lehrbuch für Einsteiger.
5. Auflage. VDI-Verlag. Düsseldorf. 1991.
("Don't be afraid of UNIX - a textbook for first-time users")
Gulbins, Jürgen & Obermayr, Karl: AIX UNIX. System V.4. Begriffe, Konzepte,
Kommandos. Springer-Verlag. Berlin, Heidelberg, New York. 1996.
Sidenote: They also cover sh, csh, and ksh.
And for further educational purposes, allow me to repeat that
ed is the "termonology originator" of the grep command binary:
g/re/p; g = global action, /re/ = regular expression, p = print;
for every line matching /re/, perform the action "print the line".
This is what grep does. Because it is what ed does.
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions