Use %e in the date(1) format string to eliminate the sed(1) command.
This commit is contained in:
parent
fab73bc221
commit
9ef295f29e
@ -32,7 +32,7 @@ case "$daily_status_mail_rejects_enable" in
|
||||
echo
|
||||
echo Checking for rejected mail hosts:
|
||||
|
||||
start=`date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'`
|
||||
start=`date -v-1d '+%b %e'`
|
||||
n=$(($daily_status_mail_rejects_logs - 2))
|
||||
rc=$({
|
||||
while [ $n -ge 0 ]
|
||||
|
@ -29,7 +29,7 @@ case "$daily_status_named_enable" in
|
||||
echo
|
||||
echo 'Checking for denied zone transfers (AXFR and IXFR):'
|
||||
|
||||
start=`date -v-1d '+%b %d' | sed 's/0\(.\)$/ \1/'`
|
||||
start=`date -v-1d '+%b %e'`
|
||||
rc=$(catmsgs |
|
||||
fgrep '^'"$start"'.*named\[[[:digit:]]\+\]: denied [AI]XFR from \[.*\]\.[[:digit:]]\+ for' | \
|
||||
sed -e 's/.*: denied [AI]XFR from \[\(.*\)\]\.[[:digit:]]* for "\(.*\)".*$/\2 from \1/'
|
||||
|
Loading…
Reference in New Issue
Block a user