On 15May2008 11:09, Lars Hecking <[EMAIL PROTECTED]> wrote:
| S?bastien Hinderer writes:
| > > The email addresses in the archive have been modified to protect against
| > > address harvesting. You need to sed -i 's/ at /@/g' 2008-May.txt.
| >
| > Okay, thanks !
| > However:
| > 1. I guess such a simple sed script works only for messages that are not
| > written in english. Indeed, in messages written in english one does
| > _not_ want to replace every occurrence of " at " byan @ sign.
|
| That was just a quick shot, proof of concept. sed -i '/^From/s/ at /@/g'
| would be better, but not perfect either.
I've been using this (perl):
for (<>)
{ s/(\S) at (([-\w]+\.)(net|com|biz|org|info|[a-z][a-z]))\b/[EMAIL
PROTECTED]/ig;
print;
}
Still dodgy, but getting more picky...
--
Cameron Simpson <[EMAIL PROTECTED]> DoD#743
http://www.cskk.ezoshosting.com/cs/
Don't have awk? Use this simple sh emulation:
#!/bin/sh
echo 'Awk bailing out!' >&2
exit 2
- Tom Horsley <[EMAIL PROTECTED]>