[Za-pm] Script
Bartho Saaiman
bartho at cae.co.za
Thu Jun 5 01:36:17 CDT 2003
Hi Nico
I have cut some of your reply to make sure that this mail does not get
to long.
About your assumption: I have various forms of the name and might have
more than one particuliar email. At this stage I am not really
interested in a name, more in the email address. If I use your script in
its current form, it seems to be adding the total for characters sent.
What I want to establish is adding up the number of emails sent.
Where can I find more on hash, as I can not seem to find anything on the
use of this. Maybe it is time for coffee :)
Nico Coetzee wrote:
> On Wednesday 04 June 2003 08:33, Bartho Saaiman wrote:
>
> Just some notes of my own - it was probably mentioned in some of the other
> mails, but I might have mist it.
>
> We assume you have various forms of the name, but one particular e-mail. When
> ever you use regular expressions or other means, remember to first convert
> all ASCII text to the same case (or at least ignore case). What we can also
> do, is just use th first instance of the real name, and ignore the rest ( if
> we want a name ). Also remember to do away with all punctuations.
>
> Given the above example, here is a simple script:
> Sample Run:
> [Mon May 26 15:16:00 SAST 2003] SMS Soe User <user at domain.co.za> sent 142
> characters to 271234567891
> [Sat May 24 12:51:37 SAST 2003] SMS "Another User" <user2 at domain.co.za> sent
> 151 characters to 271234567891
> [Fri May 23 18:16:02 SAST 2003] SMS <user3 at domain.co.za> sent 150 characters
> to 271234567891
> <output>
> $ cat test.txt | perl test.pl
> unknown = 150
> Another User = 151
> Some User = 486
> </output>
>
> NOTE: You should be aware that the data in a hash is not sorted - there is a
> way to do it, so just shout if you need it. Also note, that although the last
> instance of "Some User", the actual name is misspelled, it will still take
> only the first name it finds for that e-mail. For e-mails that have NO known
> name, we simply use 'unknown', but they will still be uniquely grouped, as we
> matched per e-mail.
>
> Cheers
--
# Bartho Saaiman
# Stellenbosch Automotive Engineering
# Tel :: 27 21 882 8820 x 215
# Cell :: 27 82 551 2703
# Email :: bartho @ cae.co.za
# GnuPG Key is available at http://www.cae.co.za/people/bartho
More information about the Za-pm
mailing list