On Jan 22, 2012, at 12:36 AM, Siteshwar Vashisht <sitesh...@gmail.com> wrote:

> Is there any option in groff to parse only a specifiec section of man page
> ? For e.g. when I say
> 
> groff -X -P -resolution -P100 -man passwd
> 
> It parses and shows me the whole page. What if I want to parse only OPTIONS
> section ? I am looking for something like :-
> 
> groff -X -P -resolution -P100 -man -parse-section "OPTIONS" passwd

If you know what section immediately follows, and you're working at the 
console, you could pipe the output through awk:

nroff -man apage.1 | awk '/^OPTIONS/, /^DESC/'

-- Larry

Reply via email to