Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Sep 1998 20:59:43 +0200 (MET DST)
From:      Jens Schweikhardt <schweikh@noc.dfn.de>
To:        sue@welearn.com.au (Sue Blake)
Cc:        freebsd-chat@FreeBSD.ORG
Subject:   Re: ed
Message-ID:  <199809081859.UAA16708@obsidian.noc.dfn.de>
In-Reply-To: <19980909042959.50859@welearn.com.au> from "Sue Blake" at Sep 9, 98 04:29:59 am

next in thread | previous in thread | raw e-mail | index | archive | help
Sue Blake asks:
# 
# Does anyone here use ed?
# 

Yes, but non-interactively.

Here's a Makefile fragment I use to frob toor's home directory
on newly installed machines.

    if ! grep 'toor.*/opt/home/root' /etc/passwd > /dev/null; then \
        ( echo ',s,: /root,: /opt/home/root,'; sleep 2; echo wq ) | \
        EDITOR=ed chpass toor; \
    fi

chpass pops you into some bizarre editor by default. This way I can
automate the task. Just in case you wonder why the sleep 2 is there:
believe it or not, whether a file has changed or not is determined
by the modification time. If the seconds don't increment, like when
the edit "session" takes only a fraction of a second, chpass thinks
/etc/passwd wasn't modified. Ugh. Yes, I sent a PR, bin/4238

Oh, and yes, I also use the ed ethernet driver :-)

Regards,

-- 
Jens Schweikhardt  http://www.shuttle.de/schweikh/
SIGSIG -- signature too long (core dumped)


PS: Have you seen this?

>From bgriffin@ic.sunysb.edu Tue Jan 23 10:26:05 MET 1996
Article: 16209 of comp.editors
Path: news.uni-stuttgart.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!news.dfn.de!newsjunkie.ans.net!chi-news.cic.net!newsfeed.internetmci.com!news.sprintlink.net!news.cc.sunysb.edu!bgriffin
From: bgriffin@ic.sunysb.edu (Eli the bearded)
Newsgroups: comp.editors
Subject: Re: Editor 4 Unix
Date: 22 Jan 1996 19:17:36 GMT
Organization: gnat tang does a body good
Lines: 121
Distribution: inet
Message-ID: <4e0nsg$841@abel.cc.sunysb.edu>
References: <30F53479.1E6@gmd.de> <4dgnc2$qov@redstone.interpath.net>
NNTP-Posting-Host: csws12.cc.sunysb.edu

In article <4dgnc2$qov@redstone.interpath.net>,
Scott McMahan - Softbase Systems <softbase@mercury.interpath.net> wrote:
>Rainer Wetekam (rainer.wetekam@gmd.de) wrote:
>: Are there any good Editors for Unix.
>: Please no Emacs and no vi.

>What's left!?

ed.

>From  the why ed is good file I saw posted here once:

From: patl@athena.mit.edu (Patrick J. LoPresti)
Message-ID: <1991Jul11.031731.9260@athena.mit.edu>
Sender: news@athena.mit.edu (News system)
Subject: The True Path (long)
Date: 11 Jul 91 03:17:31 GMT
Path: 
ai-lab!mintaka!olivea!samsung!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!patl
Newsgroups: alt.religion.emacs,alt.slack
Organization: Massachusetts Institute of Technology
Lines: 95
Xref: ai-lab alt.religion.emacs:244 alt.slack:1935

When I log into my Xenix system with my 110 baud teletype, both vi
*and* Emacs are just too damn slow.  They print useless messages like,
'C-h for help' and '"foo" File is read only'.  So I use the editor
that doesn't waste my VALUABLE time.

Ed, man!  !man ed

ED(1)               UNIX Programmer's Manual                ED(1)

NAME
     ed - text editor

SYNOPSIS
     ed [ - ] [ -x ] [ name ]
DESCRIPTION
     Ed is the standard text editor.
---

Computer Scientists love ed, not just because it comes first
alphabetically, but because it's the standard.  Everyone else loves ed
because it's ED!

"Ed is the standard text editor."

And ed doesn't waste space on my Timex Sinclair.  Just look:

-rwxr-xr-x  1 root          24 Oct 29  1929 /bin/ed
-rwxr-xr-t  4 root     1310720 Jan  1  1970 /usr/ucb/vi
-rwxr-xr-x  1 root  5.89824e37 Oct 22  1990 /usr/bin/emacs

Of course, on the system *I* administrate, vi is symlinked to ed.
Emacs has been replaced by a shell script which 1) Generates a syslog
message at level LOG_EMERG; 2) reduces the user's disk quota by 100K;
and 3) RUNS ED!!!!!!

"Ed is the standard text editor."

Let's look at a typical novice's session with the mighty ed:

golem> ed

?
help
?
?
?
quit
?
exit
?
bye
?
hello?
?
eat flaming death
?
^C
?
^C
?
^D
?

---
Note the consistent user interface and error reportage.  Ed is
generous enough to flag errors, yet prudent enough not to overwhelm
the novice with verbosity.

"Ed is the standard text editor."

Ed, the greatest WYGIWYG editor of all.

ED IS THE TRUE PATH TO NIRVANA!  ED HAS BEEN THE CHOICE OF EDUCATED
AND IGNORANT ALIKE FOR CENTURIES!  ED WILL NOT CORRUPT YOUR PRECIOUS
BODILY FLUIDS!!  ED IS THE STANDARD TEXT EDITOR!  ED MAKES THE SUN
SHINE AND THE BIRDS SING AND THE GRASS GREEN!!

When I use an editor, I don't want eight extra KILOBYTES of worthless
help screens and cursor positioning code!  I just want an EDitor!!
Not a "viitor".  Not a "emacsitor".  Those aren't even WORDS!!!! ED!
ED! ED IS THE STANDARD!!!

TEXT EDITOR.

When IBM, in its ever-present omnipotence, needed to base their
"edlin" on a UNIX standard, did they mimic vi?  No.  Emacs?  Surely
you jest.  They chose the most karmic editor of all.  The standard.

Ed is for those who can *remember* what they are working on.  If you
are an idiot, you should use Emacs.  If you are an Emacs, you should
not be vi.  If you use ED, you are on THE PATH TO REDEMPTION.  THE
SO-CALLED "VISUAL" EDITORS HAVE BEEN PLACED HERE BY ED TO TEMPT THE
FAITHLESS.  DO NOT GIVE IN!!!  THE MIGHTY ED HAS SPOKEN!!!

?





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?199809081859.UAA16708>