View Single Post
Old 16th March 2014
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

Quote:
Originally Posted by frcc View Post
i think "ed" is a default line editor also on most unix/linux systems, mac os as well (if you're into line editing), personally i quit using ed years ago (wrting hundreds of batch files on mainframes) but can use it in a pinch if a foreign machine has no nano or ee or ability to get them.
Yes, ed(1) is an editor that you will also find on any Unix system. But it is very old and extremely unintuitive so it is best to save learning it for some day in the far future. The only case I can really think of where you'd be stuck somewhere having to use ed(1) is if you're on a machine that has dropped into single user mode and the only partition you can mount is / (containing /bin) and ed(1) is the only editor that has been statically compiled.

I don't think full-blown crisis is a scenario new people are going to find themselves in very often.

And if you're a new person and that sounds frightening, you can always statically compile vi(1) and mg(1) and put the resulting binaries in /bin. Now the chances of you needing to use ed(1) have dropped to everything above, but only on a foreign machine. Plus doing this will teach you the basics of cvs(1) and cc(1) (tools you will need to compile vi(1) and mg(1)) so it might be a good weekend project anyway.

Quote:
Originally Posted by frcc View Post
Ibara's above comment conerning vi or emacs holds water if one wants to become an accomplished unix user. I would prefer either over "ed"......
Everyone should prefer anything over ed(1).
Reply With Quote