Subject: Re: NetBSD install missing things?
To: None <netbsd-help@netbsd.org>
From: David Laight <David.Laight@btinternet.com>
List: netbsd-help
Date: 01/09/2002 21:21:05
> ed(1) is a very old, line-oriented editor.  I think that ex(1) is similar,
> though I don't really use it.

Not really, ex(1) much more modern than ed(1).  As an interactive editor
(rather than one being used from a script) is it trully appalling - not helped
by the fact that the only time you find yourself using it is in single
user mode on a completely stuffed system.
(eg putting /etc/netconfig back on a solaris system, or fixing a broken
vfstab or inittab.)

I'm not sure, but at a guess, K&R wrote curses and vi to avoid having to
edit using ed.  They wrote C because the didn't like pdp11 assembler :-)
> 
> vi(1) is a screen-oriented, keystroke-interactive editor.  It requires a
> rather more capable display than does ed.  (vi likes to move the cursor
> around your screen.  ed can work on anything that supports lines of ASCII
> text.)

vi doesn't need much from your terminal.  I think 'home curser' might be
enough!  but it probably wants an addressable cursor.
Given that someone I know ported nvi to the psion V, (x86, linited to 64k
code) I dont see why a static vi couldn't be present - or is the one we
run trully horrendous?  Would back fixind in single user more easier.

At least we have (I think) cat(1), had to use grep to list files on
one system whenbooted of its 'miniroot' filesystem.
> 
> 
> As I understand it, vi was originally written as a more interactive/nicer
> interface to the ed editor.  I believe that we have both ed and ex because
> ed is kept minimalist for /bin.  On the other hand, NetBSD's vi is built
> on top of ex (or is actually the same binary?).  vi requires shared
> libraries, so you don't want that in /bin.  (^&
> 
> 
> As I said, you can use ed just about anywhere.

But no one ever does!

If you have to boot off the install CD ('cos you stuffed something horrid)
the easy thing is to mount your / on /mnt, mount your /usr on /mnt/usr
then 'chroot /mnt /bin/sh -i' to get into your normal filesystem.
Then everything is magically available...

    David