4 ms·
I'm glad ed is there. I'm glad articles like this are there. But there is no way I'll have retained that article in the moment my terminal has borked and I ac
by chernevik 14y ago
I'm glad ed is there. I'm glad articles like this are there. But there is no way I'll have retained that article in the moment my terminal has borked and I actually need ed. I wish that something like this available in the man pages, or something like them, or at least referred to in them.
Because maybe I'm not clever enough but I don't find the man page articles to be very good introductions. As reminders of syntax and options and functionality they're great, but I don't find them useful as orientations to how the various utilities work. They are short on examples and demonstrations, which are often the quickest orientations to the basic operation of a tool.
The info tool is sometimes better but not so frequently I'm accustomed to using it. On Ubuntu 'info ed' actually looks pretty good from an example standpoint. But 'info awk' looks like a copy of the man page. And 'info vi' offers a discussion of the emacs vi emulator, about which vi enthusiasts can only mutter "well played".
It would be nice if there were a 'tutorial' command (or 'dontpanic' or 'towel') which gave a brief orientation to how these tools actually worked, with examples and demos, and then some lead into resources on the host (man pages, info, help available within the particular tool) and on the web and elsewhere.
- sashahart 14y agoOn many systems you should be able to unbork the terminal with 'reset' or 'tput reset'. Then you do not need ed ;)
- dllthomas 14y agoThat's only going to fix a few causes of borked-ness. If the remote system doesn't have a termcap for your terminal, reset doesn't do much. In that case, setting TERM=vt100 will probably help matters, unless you're on a really obscure terminal of some sort.
- sashahart 14y agoI think my underlying point is that it's fine to learn ed, but if the problem is that you are borking your terminal then there are actually ways around that. These days it should almost never happen that you are sitting around tolerating a broken terminal. This is not an efficient use of time. The actual modern use cases for ed are not very common. If you want to learn it just for kicks or because you think it's cool then that is another thing.
- kstrauser 14y agoThat last happened to me fairly recently, when a server was unable to mount /usr (where the termcap stuff lives) and I had to use ed to edit the RAID config files so that I could mount it. Fun times.
- dllthomas 14y agoOuch, more extreme than I was thinking. I've encountered systems that don't like screen or urxvt or what have you, but they still had vt100 and that's a useful subset of the termcap of most modern terminal emulators. If there's no /usr at all, that's certainly a stronger argument for ed!
- ralph 14y agoI've used ed and other commands on headless systems more than once, back when networks weren't common. One has to be careful of typing and having a bell can be useful for reassurance; grep newthing foo && echo ^G.
- luriel 14y agoLinux man pages are notoriously verbose, and often obtuse and incomplete, this is in great part due to the extra complexity of GNU tools and their preference for the infamous info documentation system. OpenBSD has probably the best Unix manual pages: http://www.openbsd.org/cgi-bin/man.cgi?query=ed http://www.openbsd.org/cgi-bin/man.cgi?query=ed And Plan 9 has a manual that is a pleasure to read, this is helped in part because the commands themselves have been cleaned up and simplified in many cases: http://man.cat-v.org/p9p/1/ed http://man.cat-v.org/p9p/1/ed
- agumonkey 14y agoI dream of a system with features such as iPython live doc, or Bret Victor's tangle. It seems an approachable goal nowadays.
- andreasvc 14y agoI think instead of `verbose' you meant the opposite `terse.'
- ralph 14y agoThey're either the output of --help turned into -man macros or more noise than signal. Damn info!
- jff 14y agoInfo pages are utterly useless--I don't think I've ever had anything useful from there. If I've screwed my system up so badly I need to use ed, even "man" might not necessarily work (these days GNU commands are just so damn clever). Best thing is usually to grab another computer or your smartphone and start Googling.
- deleted 14y ago[deleted]
- ralph 14y agoIf you want an ed(1) tutorial why not try Brian Kernighan's original? http://nietzschegym.com/edtut.pdf http://nietzschegym.com/edtut.pdf
- sunkencity 14y agoMy survival kit for linux man pages is "/" for search and then "n" until option is found.