#!/bin/sh # # /usr/local/sbin/localshowkannelsms # Copyright 2010 Jonas Smedegaard # # List recently handles sms'es # logfilecount="${logfilecount:-2}" lslogfiles() { if [ -n "$logfilecount" ]; then find /var/log/kannel -name 'smsbox.log*' | sort -n -t. -k3 -r | tail -n "$logfilecount" else find /var/log/kannel -name 'smsbox.log*' | sort -n -t. -k3 -r fi } #lslogfiles | xargs zcat -f | perl -ne '/^(\S+ +\S+) .*Starting to service <(.*)> from <.*> to <\+4530959593>$/ and print "$1 $2\n"; /^\S+ (\S+) .*sendsms sender:<\S+:\+4530959593> .*msg:<(.*?)>?$/ and print " $1 $2\n"; /^(...................)(??$/ and print " $1$2\n"' lslogfiles | xargs zcat -f | perl -ne '/^(\S+ +\S+) .*Starting to service <(.*)> from <.*> to / and print "$1 $2\n"; /^\S+ (\S+) .*sendsms sender:<\S+:.*msg:<(.*?)>?$/ and print " $1 $2\n"; /^(...................)(??$/ and print " $1$2\n"' exit 0 Unnamed repository; edit this file 'description' to name the repository.Jonas Smedegaard
summaryrefslogtreecommitdiff
path: root/tags/96/83/20150123080002.90D95300047@coreander.jones.dk
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2023-06-27 09:35:08 +0200
committerJonas Smedegaard <dr@jones.dk>2023-06-27 09:35:08 +0200
commitfd54908da2b05c526dd3bee9b6dcd093214a220d (patch)
treec69c845069c99d1d01044f6fafda7c08433329c6 /tags/96/83/20150123080002.90D95300047@coreander.jones.dk
parentba46132213560cf3335d53560d519c0ec0190da2 (diff)
Diffstat (limited to 'tags/96/83/20150123080002.90D95300047@coreander.jones.dk')