Discussion:
[Newbie Alert] Search results in new document
Ton Machielsen
2017-06-23 14:01:23 UTC
Permalink
Hi all!

Just started with BBEdit.

How do i export search results into a new document? Currently i do this:

Search
Copy Search results
Open new document
Paste

Problem here is that in front of every line i get the filename and line
number where BBEdit found what i was searching for. I want to eliminate
that.

Any ideas?

Thanks,

Ton.
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"***@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://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 bbedit+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.
Patrick Woolsey
2017-06-23 16:23:39 UTC
Permalink
First, you can save a couple of steps by using File -> Export as
Text to create a file directly from the search results.

Next, though there is no option to omit the file & line number,
you can easily strip that info via an appropriate grep search &
replace, and, if you expect needing to do so often, you can either

a) save the search & replace pattern via the Saved Patterns
(g) popup
within the Find or Multi-File Search windows, or

b) create a _text factory_ and add a suitable 'Replace All' action,
then save that factory into the "Text Filters" subfolder of BBEdit's
app support folder and invoke it via Text -> Apply Text
Filter ->
[Your_Filter_Name].

Beyond that, may I ask what you plan to do with the saved search
results, e.g. are they purely archival or how else do you wish
to transform them?


Regards,

Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com/>
Post by Ton Machielsen
Hi all!
Just started with BBEdit.
Search
Copy Search results
Open new document
Paste
Problem here is that in front of every line i get the filename
and line number where BBEdit found what i was searching for. I
want to eliminate that.
Any ideas?
Thanks,
Ton.
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"***@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://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 bbedit+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.
Ton Machielsen
2017-06-23 17:44:00 UTC
Permalink
The use case here is log parsing. So i have a log with a lot of information
about a lot of objects. I want to strip everything except the information
about one specific object, so i want to filter the file showing only the
lines that contain a specific string.
If i can do that, then i don’t even have to pump it into a separate file.

Makes sense?
First, you can save a couple of steps by using File -> Export as Text to
create a file directly from the search results.
Next, though there is no option to omit the file & line number, you can
easily strip that info via an appropriate grep search & replace, and, if
you expect needing to do so often, you can either
a) save the search & replace pattern via the Saved Patterns (g) popup
within the Find or Multi-File Search windows, or
b) create a _text factory_ and add a suitable 'Replace All' action,
then save that factory into the "Text Filters" subfolder of BBEdit's
app support folder and invoke it via Text -> Apply Text Filter ->
[Your_Filter_Name].
Beyond that, may I ask what you plan to do with the saved search results,
e.g. are they purely archival or how else do you wish to transform them?
Regards,
Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com/>
Hi all!
Post by Ton Machielsen
Just started with BBEdit.
Search
Copy Search results
Open new document
Paste
Problem here is that in front of every line i get the filename and line
number where BBEdit found what i was searching for. I want to eliminate
that.
Any ideas?
Thanks,
Ton.
--
This is the BBEdit Talk public discussion group. If you have a feature
request or would like to report a problem, please email
--- 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
Visit this group at https://groups.google.com/group/bbedit.
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"***@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://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 bbedit+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.
Rich Siegel
2017-06-23 18:02:11 UTC
Permalink
On Friday, June 23, 2017, Ton Machielsen
Post by Ton Machielsen
The use case here is log parsing. So i have a log with a lot of information
about a lot of objects. I want to strip everything except the information
about one specific object, so i want to filter the file showing only the
lines that contain a specific string.
In that case, the "Process Lines Containing" command on the Text
menu is the one to use.

Enjoy,

R.
--
Rich Siegel Bare Bones Software, Inc.
<***@barebones.com> <http://www.barebones.com/>

Someday I'll look back on all this and laugh... until they
sedate me.
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"***@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://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 bbedit+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.
Patrick Woolsey
2017-06-23 18:02:50 UTC
Permalink
Yup, that entirely makes sense :) and thus may I also suggest
you consider the Text -> Process Lines Containing command.

This command can extract all the lines within the frontmost
document that contain a specific string (or grep pattern) into a
new document which you can then either use and discard, or save,
as desired.


Regards,

Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com/>
Post by Ton Machielsen
The use case here is log parsing. So i have a log with a lot of information
about a lot of objects. I want to strip everything except the information
about one specific object, so i want to filter the file showing only the
lines that contain a specific string.
If i can do that, then i don’t even have to pump it into a separate file.
Makes sense?
First, you can save a couple of steps by using File -> Export as Text to
create a file directly from the search results.
Next, though there is no option to omit the file & line number, you can
easily strip that info via an appropriate grep search & replace, and, if
you expect needing to do so often, you can either
a) save the search & replace pattern via the Saved Patterns (g) popup
within the Find or Multi-File Search windows, or
b) create a _text factory_ and add a suitable 'Replace All' action,
then save that factory into the "Text Filters" subfolder of BBEdit's
app support folder and invoke it via Text -> Apply Text Filter ->
[Your_Filter_Name].
Beyond that, may I ask what you plan to do with the saved search results,
e.g. are they purely archival or how else do you wish to transform them?
Regards,
Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com/>
Hi all!
Post by Ton Machielsen
Just started with BBEdit.
Search
Copy Search results
Open new document
Paste
Problem here is that in front of every line i get the filename and line
number where BBEdit found what i was searching for. I want to eliminate
that.
Any ideas?
Thanks,
Ton.
--
This is the BBEdit Talk public discussion group. If you have a feature
request or would like to report a problem, please email
--- 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
Visit this group at https://groups.google.com/group/bbedit.
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"***@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://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 bbedit+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.
Ton Machielsen
2017-06-24 17:51:04 UTC
Permalink
That’s exactly what i’m looking for. Thanks!!
Yup, that entirely makes sense :) and thus may I also suggest you consider
the Text -> Process Lines Containing command.
This command can extract all the lines within the frontmost document that
contain a specific string (or grep pattern) into a new document which you
can then either use and discard, or save, as desired.
Regards,
Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com/>
The use case here is log parsing. So i have a log with a lot of information
Post by Ton Machielsen
about a lot of objects. I want to strip everything except the information
about one specific object, so i want to filter the file showing only the
lines that contain a specific string.
If i can do that, then i don’t even have to pump it into a separate file.
Makes sense?
First, you can save a couple of steps by using File -> Export as Text to
Post by Patrick Woolsey
create a file directly from the search results.
Next, though there is no option to omit the file & line number, you can
easily strip that info via an appropriate grep search & replace, and, if
you expect needing to do so often, you can either
a) save the search & replace pattern via the Saved Patterns (g) popup
within the Find or Multi-File Search windows, or
b) create a _text factory_ and add a suitable 'Replace All' action,
then save that factory into the "Text Filters" subfolder of BBEdit's
app support folder and invoke it via Text -> Apply Text Filter ->
[Your_Filter_Name].
Beyond that, may I ask what you plan to do with the saved search results,
e.g. are they purely archival or how else do you wish to transform them?
Regards,
Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com/>
Hi all!
Post by Ton Machielsen
Just started with BBEdit.
Search
Copy Search results
Open new document
Paste
Problem here is that in front of every line i get the filename and line
number where BBEdit found what i was searching for. I want to eliminate
that.
Any ideas?
Thanks,
Ton.
--
This is the BBEdit Talk public discussion group. If you have a feature
request or would like to report a problem, please email
--- 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
Visit this group at https://groups.google.com/group/bbedit.
--
This is the BBEdit Talk public discussion group. If you have a feature
request or would like to report a problem, please email
--- 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
Visit this group at https://groups.google.com/group/bbedit.
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"***@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://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 bbedit+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.
Loading...