@vaporeon_ do you know find? purrticularly -exec?
@aescling Barely 😓
I know find some-directory -name '*.txt (or -iname for case-insensitive, also substitute whatever other globbing expression instead of *.txt, just don't forget the quotes), I know find -print | less (this is what I use to use to look at a tree of files), I know find -exec some-command {} \;, where {} will get substituted with the filename. I've used it with grep before to get a list of files (just the filenames, not all occurrences) that contain a particular string.
I vaguely remember there also was some other variant of exec where you could specify multiple files? With + or something? But I completely forgot :(
@vaporeon_ fur using multiple arguments in the same command you just add a + after the {}, e.g., find . -type f -exec grep pattern '{}' +
@aescling Wait. Should I be quoting the {}? I genuinely forgot... (Also, does the command you just wrote not need a \; at the end, after the +?)
@vaporeon_ it's shell syntax, so yes
@vaporeon_ really? i’m pretty sure that should be a syntax error. huh