ODFFILESEARCH(1p)
π ODFFILESEARCH π
okay bestie, so this is odffilesearch, and it lives in the User Contributed Perl Documentation section of the manual. It's a whole vibe: file selection by keywords, no cap. π
β¨ NAME β¨
odffilesearch β picking files by keywords, literally the easiest way π¦
πΈ SYNOPSIS πΈ
odffilesearch -R "D:\Documents\*.odt" openoffice desktop XML
this one gives you the list of ODF Text documents hanging out in that directory and all its subdirectories, and containing the words "openoffice", "desktop" AND "XML" β yes, all three, it's giving thorough π
odffilesearch -command "rm -f %f" "*.ods *.odt" lost dismiss cancel
and this one runs "rm -f filename" (aka deletes the file if you're on a Unix system, bestie that's a whole commitment π) for every ODT or ODS file sitting in the current directory that contains the words "lost", "dismiss" AND "cancel".
π USAGE π
odffilesearch [-options] <file filter> <keyword list>
π« DESCRIPTION π«
so what does this little icon do? it lets you pull back a list of files that match a set of keywords or regular expressions you hand it. A file gets selected when it contains β either in its text and/or in its metadata (that's title, subject, keywords or description) β all of the search strings you gave it. All of them. Every single one. π
the selected files get echoed to standard output, one file per line, which means you can use this thing as a filter and pipe its results straight into another program. Obsessed. β¨ OR, if you'd rather, you can have it launch a given shell command every single time a file matches, which lets you process those selected documents on the fly, main character energy fr fr.
the file filter can hold one or more space-separated paths, and each path can contain jokers β so yeah, you can explore several directories and/or several filename patterns at once. Versatile queen. πΈ
and every argument after the file filter? processed as search criteria. Periodt.
π OPTIONS π
-R,-recursiveβ pulls in the subdirectories of each search directory you gave it. Going deep, no cap. π³οΈ-verbose,-trace,-debugβ echoes some processing comments so you can see what's going on in there π-warningsβ activates the warning messages of theOpenOffice::OODocAPI. Let it speak. π£οΈ-log <file>β same energy as-verbose, except the messages get sent to the given file instead and don't pollute your standard output. So considerate π-result <file>,-output <file>β sends the list of matching files to the given file instead of to standard output π-criteria <file>β grabs search criteria from a file, one per line. The loaded search keywords can be combined with additional criteria passed on the command line, if there are any. Stack 'em. π₯-command <command>,-exec <command>β executes a shell command for each matching file. If the command string contains"%f", that substring gets replaced with the name of the selected file. If you use this option, the selection list is not echoed to standard output. And if-verboseis on, the value returned by the command gets echoed too. β‘-encoding <encoding>β selects your character set. This one is mandatory if one or more of your search criteria contain characters that don't belong to the default character set. Don't skip it, bestie, it will not go well π₯
heads up: that-commandexample up in the synopsis is runningrm -f, which deletes files. Permanently. Be so sure before you run it, okay? ππ«Ά
okay that's the whole page, you ate that π this lil gem is from the perl v5.34.0 era, dated 2022-06-16, and it's filed under User Contributed Perl Documentation. go forth and search some files, bestie β¨ππ
π¦ where this page comes from
- debian bookworm: libopenoffice-oodoc-perl 2.125-4 Β· LGPL-2.1-only
- debian trixie: libopenoffice-oodoc-perl 2.125-4 Β· LGPL-2.1-only
- ubuntu noble: libopenoffice-oodoc-perl 2.125-4 Β· LGPL-2.1-only
- ubuntu questing: libopenoffice-oodoc-perl 2.125-4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms