Jaroslaw Rafa via Postfix-users:
> Dnia 10.10.2024 o godz. 15:31:08 Gomes, Rich via Postfix-users pisze:
> > Good catch!
> >
> > Mine is in this format:
> > Oct 10 11:30:36
>
> Then probably $(date +"%b %e") instead of $(date +"%Y-%m-%d") will work.
> Or even better, put a ^ sign before $ to ensure it starts at the beginning
> of the line.
Depending on your OS,
date --date yesterday
will return yesterday's date. If that is the case,
grep "^$(date --date yesterday +'%b %e')"
will match logging with yesterday's date as in "Oct 9" (including the two
spaces).
My servers rotate logfiles daily, so I don't need to grep for dates.
Wietse
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]