Extract matching lines from all open files

12 views
Skip to first unread message

@lbutlr

unread,
Nov 4, 2021, 6:47:25 PM11/4/21
to BBEdit Talk
I have a bunch of files open and I want to extract all the lines that match a grep pattern from all the files. I do not want to do this from the shell, because I do not want to save the files in their current state.

It doesn't matter if I copy or cut the matching lines, but I would like all the matches to be in a new single file.

--
For more than a thousand generations the Jedi were the guardians of
peace and justice in the galaxy. Before the dark times. Before
the Empire.

Patrick Woolsey

unread,
Nov 4, 2021, 7:00:31 PM11/4/21
to bbe...@googlegroups.com
On Nov 04, 2021, at 18:47, @lbutlr <kre...@kreme.com> wrote:
>
> I have a bunch of files open and I want to extract all the lines that match a grep pattern from all the files. I do not want to do this from the shell, because I do not want to save the files in their current state.

Please try the 'Extract' command in the Multi-File Search window. ;-)


Regards,

Patrick Woolsey
==
Bare Bones Software, Inc. <https://www.barebones.com/>

@lbutlr

unread,
Nov 4, 2021, 7:05:19 PM11/4/21
to BBEdit Talk
On 2021 Nov 04, at 17:00, Patrick Woolsey <pwoo...@barebones.com> wrote:
> On Nov 04, 2021, at 18:47, @lbutlr <kre...@kreme.com> wrote:
>>
>> I have a bunch of files open and I want to extract all the lines that match a grep pattern from all the files. I do not want to do this from the shell, because I do not want to save the files in their current state.
>
> Please try the 'Extract' command in the Multi-File Search window. ;-)

Doh!

--
Every absurdity has a champion to defend it.

Reply all
Reply to author
Forward
0 new messages