Re: SOLVED - Re: follow-up: searching a directory sub-tree.

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

 



On 3/27/25 11:40 AM, Todd Zullinger wrote:
home user via users wrote:
On 3/26/25 8:02 PM, home user via users wrote:
On 3/26/25 7:40 PM, Sam Varshavchik wrote:
home user via users writes:
...
I think the man page clearly indicates that the -e option
requires an argument:

    Matching Control
        -e PATTERNS, --regexp=PATTERNS
               Use PATTERNS as the patterns.  If this option is used
               multiple times or is combined with the -f (--file) option,
               search for all patterns given.  This option can be used to
               protect a pattern beginning with “-”.

It may be specified multiple times, each of which requires
an argument, e.g.:

     grep -e foo -e bar /path/to/baz

Thank-you, Todd.
The man page is clear.  I was rushed and careless.

If you're trying to write a generic wrapper around grep, I
don't think you'll end up with something that is much (if
any) easier to use than grep.  To do so, you'll have to
learn the grep syntax well enough that you might as well
just call grep. :)

Rather, if you have some common use case (or a few), write
one or more scripts which work for just those cases and
properly handles the arguments needed (including rejecting
bogus uses if they can be determined from the arguments
given).

In the end, the time spent writing those wrappers is likely
to be more than the time spent reading and remembering the
grep command syntax.

I'm doing the second (common use case), not the first.
The help of this list's members in this thread has led to what
I need and want.

The use case (for the curious)...
I have "link pages" (.html) of links to frequently visited and
favorite web sites and pages.  I have text files of descriptions
and metadata for favorite web pages (example: youtube videos).
I was using "find", and am now using "grep" to see where the two
sets of files are not in sync.  The search strings are youtube
video hash keys (is that the correct term?), which can contain
dashes and other characters that are neither digits nor letters.
If anyone is curious, the search keys in my examples in this
thread are for pipe organ performances that I like.

--
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux