.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "URIFIND 1p" .TH URIFIND 1p "2017-08-01" "perl v5.26.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" urifind \- find URIs in a document and dump them to STDOUT. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& $ urifind file .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fIurifind\fR is a simple script that finds URIs in one or more files (using \f(CW\*(C`URI::Find\*(C'\fR), and outputs them to to \s-1STDOUT.\s0 That's it. .PP To find all the URIs in \fIfile1\fR, use: .PP .Vb 1 \& $ urifind file1 .Ve .PP To find the URIs in multiple files, simply list them as arguments: .PP .Vb 1 \& $ urifind file1 file2 file3 .Ve .PP \&\fIurifind\fR will read from \f(CW\*(C`STDIN\*(C'\fR if no files are given or if a filename of \f(CW\*(C`\-\*(C'\fR is specified: .PP .Vb 1 \& $ wget http://www.boston.com/ \-O \- | urifind .Ve .PP When multiple files are listed, \fIurifind\fR prefixes each found \s-1URI\s0 with the file from which it came: .PP .Vb 3 \& $ urifind file1 file2 \& file1: http://www.boston.com/index.html \& file2: http://use.perl.org/ .Ve .PP This can be turned on for single files with the \f(CW\*(C`\-p\*(C'\fR (\*(L"prefix\*(R") switch: .PP .Vb 2 \& $urifind \-p file3 \& file1: http://fsck.com/rt/ .Ve .PP It can also be turned off for multiple files with the \f(CW\*(C`\-n\*(C'\fR (\*(L"no prefix\*(R") switch: .PP .Vb 3 \& $ urifind \-n file1 file2 \& http://www.boston.com/index.html \& http://use.perl.org/ .Ve .PP By default, URIs will be displayed in the order found; to sort them ascii-betically, use the \f(CW\*(C`\-s\*(C'\fR (\*(L"sort\*(R") option. To reverse sort them, use the \f(CW\*(C`\-r\*(C'\fR (\*(L"reverse\*(R") flag (\f(CW\*(C`\-r\*(C'\fR implies \f(CW\*(C`\-s\*(C'\fR). .PP .Vb 4 \& $ urifind \-s file1 file2 \& http://use.perl.org/ \& http://www.boston.com/index.html \& mailto:webmaster@boston.com \& \& $ urifind \-r file1 file2 \& mailto:webmaster@boston.com \& http://www.boston.com/index.html \& http://use.perl.org/ .Ve .PP Finally, \fIurifind\fR supports limiting the returned URIs by scheme or by arbitrary pattern, using the \f(CW\*(C`\-S\*(C'\fR option (for schemes) and the \&\f(CW\*(C`\-P\*(C'\fR option. Both \f(CW\*(C`\-S\*(C'\fR and \f(CW\*(C`\-P\*(C'\fR can be specified multiple times: .PP .Vb 2 \& $ urifind \-S mailto file1 \& mailto:webmaster@boston.com \& \& $ urifind \-S mailto \-S http file1 \& mailto:webmaster@boston.com \& http://www.boston.com/index.html .Ve .PP \&\f(CW\*(C`\-P\*(C'\fR takes an arbitrary Perl regex. It might need to be protected from the shell: .PP .Vb 2 \& $ urifind \-P \*(Aqs?html?\*(Aq file1 \& http://www.boston.com/index.html \& \& $ urifind \-P \*(Aq\e.org\eb\*(Aq \-S http file4 \& http://www.gnu.org/software/wget/wget.html .Ve .PP Add a \f(CW\*(C`\-d\*(C'\fR to have \fIurifind\fR dump the refexen generated from \f(CW\*(C`\-S\*(C'\fR and \f(CW\*(C`\-P\*(C'\fR to \f(CW\*(C`STDERR\*(C'\fR. \f(CW\*(C`\-D\*(C'\fR does the same but exits immediately: .PP .Vb 3 \& $ urifind \-P \*(Aq\e.org\eb\*(Aq \-S http \-D \& $scheme = \*(Aq^(\ebhttp\eb):\*(Aq \& @pats = (\*(Aq^(\ebhttp\eb):\*(Aq, \*(Aq\e.org\eb\*(Aq) .Ve .PP To remove duplicates from the results, use the \f(CW\*(C`\-u\*(C'\fR (\*(L"unique\*(R") switch. .SH "OPTION SUMMARY" .IX Header "OPTION SUMMARY" .IP "\-s" 4 .IX Item "-s" Sort results. .IP "\-r" 4 .IX Item "-r" Reverse sort results (implies \-s). .IP "\-u" 4 .IX Item "-u" Return unique results only. .IP "\-n" 4 .IX Item "-n" Don't include filename in output. .IP "\-p" 4 .IX Item "-p" Include filename in output (0 by default, but 1 if multiple files are included on the command line). .ie n .IP "\-P $re" 4 .el .IP "\-P \f(CW$re\fR" 4 .IX Item "-P $re" Print only lines matching regex '$re' (may be specified multiple times). .ie n .IP "\-S $scheme" 4 .el .IP "\-S \f(CW$scheme\fR" 4 .IX Item "-S $scheme" Only this scheme (may be specified multiple times). .IP "\-h" 4 .IX Item "-h" Help summary. .IP "\-v" 4 .IX Item "-v" Display version and exit. .IP "\-d" 4 .IX Item "-d" Dump compiled regexes for \f(CW\*(C`\-S\*(C'\fR and \f(CW\*(C`\-P\*(C'\fR to \f(CW\*(C`STDERR\*(C'\fR. .IP "\-D" 4 .IX Item "-D" Same as \f(CW\*(C`\-d\*(C'\fR, but exit after dumping. .SH "AUTHOR" .IX Header "AUTHOR" darren chamberlain .SH "COPYRIGHT" .IX Header "COPYRIGHT" (C) 2003 darren chamberlain .PP This library is free software; you may distribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" URI::Find