groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Parsing specific section of man page


From: Larry Kollar
Subject: Re: [Groff] Parsing specific section of man page
Date: Sun, 22 Jan 2012 08:53:43 -0500

On Jan 22, 2012, at 12:36 AM, Siteshwar Vashisht <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]