URIFIND(1)
π URIFIND(1) β like, the urifind manual page, but make it make sense β¨
okay so bestie, this is urifind, a lil Perl script from the perl man pages (@ perl v5.32.1, no cap π«Ά). it's genuinely so simple and I'm obsessed. let's go π
πΈ NAME πΈ
urifind β find URIs in a document and dump them to STDOUT. that's literally it. that's the whole job. iconic.
β¨ SYNOPSIS β¨
$ urifind file
like... that's it. one file. go off π
π¦ DESCRIPTION π¦
urifind is a simple script that finds URIs in one or more files (using URI::Find) and outputs them to STDOUT. That's it. no cap, that is the entire personality. and honestly? we love a script that knows what it is π
To find all the URIs in file1, use:
$ urifind file1
To find the URIs in multiple files, simply list them as arguments β like, just keep going, she can handle it:
$ urifind file1 file2 file3
urifind will read from STDIN if no files are given or if a filename of - is specified. pipe gang rise up π:
$ wget http://www.boston.com/ -O - | urifind
When multiple files are listed, urifind prefixes each found URI with the file from which it came. look at her being all organized and helpful π:
$ urifind file1 file2
file1: http://www.boston.com/index.html
file2: http://use.perl.org/
This can be turned on for single files with the -p ("prefix") switch:
$urifind -p file3
file1: http://fsck.com/rt/
It can also be turned off for multiple files with the -n ("no prefix") switch β main character energy, no labels, just vibes:
$ urifind -n file1 file2
http://www.boston.com/index.html
http://use.perl.org/
By default, URIs will be displayed in the order found; to sort them ascii-betically, use the -s ("sort") option. To reverse sort them, use the -r ("reverse") flag (-r implies -s β she said what she said π):
$ 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/
Finally, urifind supports limiting the returned URIs by scheme or by arbitrary pattern, using the -S option (for schemes) and the -P option. Both -S and -P can be specified multiple times. stack 'em like bracelets bestie β¨:
$ urifind -S mailto file1
mailto:webmaster@boston.com
$ urifind -S mailto -S http file1
mailto:webmaster@boston.com
http://www.boston.com/index.html
-P takes an arbitrary Perl regex. It might need to be protected from the shell β yes, the shell is dramatic, just quote it π:
$ urifind -P 's?html?' file1
http://www.boston.com/index.html
$ urifind -P '\.org\b' -S http file4
http://www.gnu.org/software/wget/wget.html
Add a -d to have urifind dump the refexen generated from -S and -P to STDERR. -D does the same but exits immediately β like, dump and dip πββοΈ:
$ urifind -P '\.org\b' -S http -D
$scheme = '^(\bhttp\b):'
@pats = ('^(\bhttp\b):', '\.org\b')
To remove duplicates from the results, use the -u ("unique") switch. no repeats allowed, we're not doing that here π«
π OPTION SUMMARY π
-sβ Sort results.-rβ Reverse sort results (implies-s).-uβ Return unique results only.-nβ Don't include filename in output.-pβ Include filename in output (0 by default, but 1 if multiple files are included on the command line).-P $reβ Print only lines matching regex$re(may be specified multiple times).-S $schemeβ Only this scheme (may be specified multiple times).-hβ Help summary.-vβ Display version and exit.-dβ Dump compiled regexes for-Sand-PtoSTDERR.-Dβ Same as-d, but exit after dumping.
π§ AUTHOR π§
darren chamberlain <darren@cpan.org> β ty for your service king π«Ά
π COPYRIGHT π
(C) 2003 darren chamberlain
This library is free software; you may distribute it and/or modify it under the same terms as Perl itself.
π SEE ALSO π
URI::Find β the actual brains behind the operation, go show her some love.
and that's the whole page bestie!! β¨ no crumbs left. this was perl v5.32.1, dated 2021-07-27, and it's giving "small script, big heart" π
mwah, ily, go find some URIs π¦π
π¦ where this page comes from
- epel 9: perl-URI-Find 20160806-16.el9 Β· GPL+ or Artistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms