Re:Don Libes' Expect: A Surprisingly Underappreciated Unix A...
by andlrc on Thursday December 08, 2016 @02:37PM
(#13133424)
`info` also contains a lot of historical notes, i.e.
$ info Groff | awk '$2 == "History"{f = 4};f && f--' RS= ORS='\n\n'
1.2 History
===========
'troff' can trace its origins back to a formatting program called
'RUNOFF', written by Jerry Saltzer, which ran on the CTSS (_Compatible
Time Sharing System_, a project of MIT, the Massachusetts Institute of
Technology) in the mid-sixties.(1) (*note History-Footnote-1::) The
name came from the use of the phrase "run off a document", meaning to
print it out. Bob Morris ported it to the 635 architecture and called
the program 'roff' (an abbreviation of 'runoff'). It was rewritten as
'rf' for the PDP-7 (before having UNIX), and at the same time (1969),
Doug McIllroy rewrote an extended and simplified version of 'roff' in
the BCPL programming language.
In 1971, the UNIX developers wanted to get a PDP-11, and to justify
the cost, proposed the development of a document formatting system for
the AT&T patents division. This first formatting program was a
reimplementation of McIllroy's 'roff', written by J. F. Ossanna.
Re:Don Libes' Expect: A Surprisingly Underappreciated Unix A...
by kazinator on Thursday December 08, 2016 @04:15PM
(#13134370)
I'm well familiar with Awk RS="" paragraph mode and all, but I'm scratching my head why f = 4 to fetch three paragraphs.
[Edit]: Indeed, I ran your command verbatim and obtained one more paragraph: When they needed are more flexible language [...].
You sneaky devil!
if you didn't already, I highly recommend you type 'info info' in your terminal and spend half an hour learning how to use it.
Plus, if you are an emacs user, the emacs manual is bundled with emacs in info format, and you can obviously read info documents in emacs too.
Reading the gnu emacs manual inside emacs is a game-changer.