On Mar 13, 2017, at 14:02, Christopher Stone <[email protected]
<mailto:[email protected]>> wrote:
>
> On Mar 13, 2017, at 12:26, Magick! <[email protected]
> <mailto:[email protected]>> wrote:
>> I have two text files: fichier1.csv and fichier2.csv and I want to remove
>> from the first all the lines that contain an email address of the second.
>> How to make it with BBEdit?
Hey There,
Okay, now let's try operating on the front document in BBEdit with a
text-filter.
It's simple to turn your list of email addresses into a sed text-filter:
#!/usr/bin/env bash
sed '
/[email protected] <mailto:[email protected]>/d
/[email protected] <mailto:[email protected]>/d
/^[[:blank:]]*$/d
' \
| sort -u
The ādā command delete lines where the pattern is found.
So I'm deleting your listed email addresses and all blank lines.
\
| sort -u
The backslash is a continuation character in Bash, and I'm piping to sort
-u(nique) to remove any duplicate lines.
Setting this up with the Process Lines Containing function in BBEdit is easy
enough, but it's not conducive to repeating the operation on a regular basis.
My previous script and this one make repeating the process pretty simple.
--
Best Regards,
Chris
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.