Earlier quoted context omitted.
That project is a symptom of manual pages not having good “EXAMPLES” sections. The examples on that web page should be contributed upstream to the manuals pages of the software that they are for. If you want a fast way to read the EXAMPLES section only for a command, here is a shell function which creates an ‘eg’ command which only displays the “EXAMPLES” section of manual pages: eg(){ MAN_KEEP_FORMATTING=1 man "$@"…
Thank you, this is really helpful. Could anyone contribute a version for OSX?
Here's my terribly hackish version for BSD userlands (briefly tested on FreeBSD, may work on OS X):
#!/bin/sh
eg () {
man $1 | grep '^E.EX.XA' -A 1000 | grep '^[A-Z]' -m 2 -B 1000 -A 0 | sed '$d' | $PAGER
}
eg $1