Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

podgrep (1)

Name

podgrep - grep in pod sections only

Synopsis

podgrep [-i] [-p] [-f] [-h] pattern [ files ... ]

Description

User Contributed Perl Documentation                                 PODGREP(1)



NAME
       podgrep - grep in pod sections only

SYNOPSIS
       podgrep [-i] [-p] [-f] [-h] pattern [ files ... ]

DESCRIPTION
       This program searches each paragraph in a pod document and prints each
       paragraph that matches the supplied pattern.  This pod may be mixed
       with program code, such as in a module.

       Options are:

       -i  means case insensitive match

       -p  means page output though the user's pager.  The pager will be
           primed with an argument to search for the string.  This highlights
           the result.

       -f  means format output though the pod2text program.

       -h  means check for matches in pod "=head" and "=item" headers alone,
           and to keep printing podagraphs until the next header is found.

EXAMPLES
           $ podgrep mail `pmpath CGI`
           (prints out podagraphs from the CGI.pm manpage that mention mail)

           $ podgrep -i destructor `sitepods`
           (prints out podagraphs that mention destructors in the
            site-installed pods)

           $ podgrep -i 'type.?glob' `stdpods`

           (prints out podagraphs that mention typeglob in the
            standard pods)

           $ podgrep -hpfi "lock" `faqpods`

           (prints out all podagraphs with "lock" in the headers
           case-insensitively, then formats these with pod2text, then
           shows them in the pager with matches high-lighted)

           $ podgrep -fh seek `podpath perlfunc`
           (prints out and formats podagraphs from the standard perlfunc manpage
           whose headers or items contain "seek".)


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+----------------------------+
       |ATTRIBUTE TYPE |      ATTRIBUTE VALUE       |
       +---------------+----------------------------+
       |Availability   | library/perl-5/pmtools-532 |
       +---------------+----------------------------+
       |Stability      | Uncommitted                |
       +---------------+----------------------------+

SEE ALSO
       faqpods(1), pfcat(1), pmpath(1), pod2text(1), podpath(1), sitepods(1),
       stdpods(1), and tcgrep(1).

NOTE
       For a pager, the author likes these environment settings (in the login
       startup, of course):

           $ENV{PAGER} = "less";
           $ENV{LESS}  = "MQeicsnf";

AUTHORS and COPYRIGHTS
       Copyright (C) 1999 Tom Christiansen.

       Copyright (C) 2006-2014 Mark Leighton Fisher.

LICENSE
       This is free software; you can redistribute it and/or modify it under
       the terms of either: (a) the GNU General Public License as published by
       the Free Software Foundation; either version 1, or (at your option) any
       later version, or (b) the Perl "Artistic License".  (This is the Perl 5
       licensing scheme.)

       Please note this is a change from the original pmtools-1.00 (still
       available on CPAN), as pmtools-1.00 were licensed only under the Perl
       "Artistic License".



NOTES
       Source code for open source software components in Oracle Solaris can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This software was built from source available at
       https://github.com/oracle/solaris-userland.  The original community
       source was downloaded from
       http://search.cpan.org/CPAN/authors/id/M/ML/MLFISHER/pmtools-2.0.0.tar.gz.

       Further information about this software can be found on the open source
       community website at http://search.cpan.org/dist/pmtools/.



perl v5.32.0                      2014-02-04                        PODGREP(1)