diff options
author | wosch <wosch@FreeBSD.org> | 1998-02-05 15:33:54 +0000 |
---|---|---|
committer | wosch <wosch@FreeBSD.org> | 1998-02-05 15:33:54 +0000 |
commit | 0729b6bb8946bfe08623d9e8dbc0027251899df4 (patch) | |
tree | e7f0ce26fba326a8a3a6a867a3eba7adbbcf7b3f /etc/periodic | |
parent | c3aba9f5d238a0431a36ee328a25d9b476515ebf (diff) | |
download | FreeBSD-src-0729b6bb8946bfe08623d9e8dbc0027251899df4.zip FreeBSD-src-0729b6bb8946bfe08623d9e8dbc0027251899df4.tar.gz |
Replace sed(1) with perl(1). The 4.4BSD sed programm is
200 times slower than perl or SunOS 5.5.1 sed.
Diffstat (limited to 'etc/periodic')
-rwxr-xr-x | etc/periodic/daily/460.status-mail-rejects | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/periodic/daily/460.status-mail-rejects b/etc/periodic/daily/460.status-mail-rejects index 88faccd..696e4ed 100755 --- a/etc/periodic/daily/460.status-mail-rejects +++ b/etc/periodic/daily/460.status-mail-rejects @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: 460.status-mail-rejects,v 1.3 1998/01/23 01:58:18 brian Exp $ +# $Id: 460.status-mail-rejects,v 1.4 1998/01/26 02:26:29 brian Exp $ # if [ -d /etc/mail -a -f /var/log/maillog ]; then @@ -8,9 +8,9 @@ if [ -d /etc/mail -a -f /var/log/maillog ]; then echo Checking for rejected mail hosts: start=`date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'` - zcat -fc /var/log/maillog.0* /var/log/maillog | - sed -n \ - -e "s/^$start.*ruleset=check_mail, arg1=<.*@\\([^>]*\\)>.*reject=.*/ \\1/p" \ - -e "s/^$start.*ruleset=check_relay, arg1=\\([^, ]*\\), .*reject=.*/ \\1/p" | - sort -u + zcat -fc /var/log/maillog.0* /var/log/maillog | grep reject= | + perl -ne "print \"\$1\n\" + if (/^$start.*ruleset=check_mail, arg1=<.*@([^>]*)>.*reject=/o || + /^$start.*ruleset=check_relay, arg1=([^, ]*), .*reject=/o)" | + sort -u fi |