From b33708b7bad20a5ced676f80f16188bb523613a6 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 4 May 2010 12:03:48 +0200 Subject: Add/update sms- and Kannel-related scripts. --- localfilterkannelsmsboxlog | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 localfilterkannelsmsboxlog (limited to 'localfilterkannelsmsboxlog') diff --git a/localfilterkannelsmsboxlog b/localfilterkannelsmsboxlog new file mode 100755 index 0000000..b3ac4a6 --- /dev/null +++ b/localfilterkannelsmsboxlog @@ -0,0 +1,36 @@ +#!/usr/bin/perl + +use warnings; + +while (<>) { + s/^\S+\h+//; + s/[\[].* INFO: //; + s/\+?(45)?(\d{8})\b/$2/g; + s/30640(636)\b/UNOTL$1/g; + s/30959(593)\b/UNOT$1/g; + s/22388(550)\b/SONOF$1/g; + s/24803(952)\b/TDC__$1/g; + s/28263(532)\b/TELIA$1/g; + s/28590(882)\b/TELIA$1/g; + s/25822(784)\b/TELE2$1/g; + s/29331(323)\b/COOP_$1/g; + s/29331(326)\b/COOP_$1/g; + s/26806(408)\b/vera_$1/g; + s/40917(191)\b/jacob$1/g; + s/29903(585)\b/seimi$1/g; + s/27846(210)\b/seimi$1/g; + s/27846(211)\b/boaz_$1/g; + s/27846(212)\b/andré$1/g; + s/28265(004)\b/candc$1/g; + s/26744(515)\b/krstn$1/g; + s/25486(484)\b/jens_$1/g; + s/20759(076)\b/sissl$1/g; + s/40843(136)\b/jonas$1/g; + s/\d{5}(\d{3})\b/*****$1/g; +# /^(.{8}).*Starting to service <([^>\n]*)> from <([^>\n]*)> to <([^>\n]*)>/ and print "$1 $3->$4\n$2\n"; + /^(.{5}).*Starting to service <([^>\n]*)> from <([^>\n]*)> to <([^>\n]*)>/ and print "$1<$3: $2\n"; +# /^(.{8}).*sendsms sender:<[^:\n]*:([^>\n]*)> \([^\)\n]*\) to:<([^>\n]*)> msg:<([^>\n]{0,10}[^ >\n]*)/ and print "$1 to $3 via $2: $4\n"; + /^(.{5}).*sendsms sender:<[^:\n]*:([^>\n]*)> \([^\)\n]*\) to:< *([^>\n]*)> msg:<([^>\n]{0,10}[^ >\n]*)/ and print "$1>$3: $4\n"; +} + +1; -- cgit v1.2.3