the main question is a) dynamically b) ! yesterday ! from the time the script runs
this is intended for a cron-job
Am 07.05.2013 16:09, schrieb Newton Pasqualini Filho:
> Use AWK
>
> Like this:
>
> cat /var/log/maillog | awk '{ if ($1=="May" && $2=="7") print $0 }' | grep
> NOQUEUE
>
>
> Em 07/05/2013, às 11:03, Reindl Harald <[email protected]> escreveu:
>
>> Hi
>>
>> i would like a grep of all records from the previous
>> day with "NOQUEUE" in a bash script - how do i get
>> exactly the format like below from /var/log/maillog
>> and yesterday?
>>
>> May 7 12:29:39 mail postfix/smtpd[29696]: NOQUEUE
>>
>> final goal:
>> add the output at the bottom a my daily logwatch
signature.asc
Description: OpenPGP digital signature
