On 02/11/2019, at 20:46, 'David J' via BBEdit Talk <[email protected] 
<mailto:[email protected]>> wrote:
> That's right, multiple text files all in one parent folder on an external 
> drive, but there are many child folders below. I'm new to terminal and grep, 
> could I specify a folder and multiple folders below with the expression you 
> came up with?


Hey David,

Yes – you can.


cd ~/'test_directory/Dictionary Files Split/';  # Change the working directory.
# pwd;  # Print Working Directory (currently commented-out)
egrep -i -R -A1 -B1 '^(beemaster|fimbriodentate|muddlehead|Terpsichorean)$' *;


-R is for Recursive.

The output of my test folder with several large files of dictionary words is:


Sub Folder A/eimer-fin.txt-fimbrillose
Sub Folder A/eimer-fin.txt:fimbriodentate
Sub Folder A/eimer-fin.txt-Fimbristylis
--
--
Sub Folder B/mountainless-oenomel.txt-muddledom
Sub Folder B/mountainless-oenomel.txt:muddlehead
Sub Folder B/mountainless-oenomel.txt-muddleheaded
--
--
Sub Folder C/tenontoplasty-typographical.txt-terpsichoreally
Sub Folder C/tenontoplasty-typographical.txt:Terpsichorean
Sub Folder C/tenontoplasty-typographical.txt:terpsichorean
Sub Folder C/tenontoplasty-typographical.txt-Terraba
--
--
beefer-capitulum.txt-beeman
beefer-capitulum.txt:beemaster
beefer-capitulum.txt-been


An extra word was found in group 3, because I had case-insensitive turned ON.

It looks to me like you've found what you need in BBEdit's GUI Mult-File 
Search, but it's good to have options.

--
Best Regards,
Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to