Use %e in the date(1) format string to eliminate the sed(1) command.

This commit is contained in:
Ruslan Ermilov 2003-11-07 21:55:35 +00:00
parent fab73bc221
commit 9ef295f29e
2 changed files with 2 additions and 2 deletions

View File

@ -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 ]

View File

@ -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/'