On May 7, 2013, at 16:15, Reindl Harald wrote:
> the main question is
>
> a) dynamically
> b) ! yesterday ! from the time the script runs
>
> this is intended for a cron-job
Things like;
==
$ date -d yesterday
Mon May 6 16:20:20 CEST 2013
$ date -d yesterday "+%Y%m%d"
20130506
==
Add 'date
Am 07.05.2013 16:20, schrieb Martin Schütte:
> On 05/07/2013 04:03 PM, Reindl Harald wrote:
>> exactly the format like below from /var/log/maillog and yesterday?
>
> With GNU date:
> fgrep -e "`date -d yesterday +'%b %e'`" /var/log/mail.log | fgrep NOQUEUE
perfect - thank you very much!
sign
On 05/07/2013 04:03 PM, Reindl Harald wrote:
> exactly the format like below from /var/log/maillog and yesterday?
With GNU date:
fgrep -e "`date -d yesterday +'%b %e'`" /var/log/mail.log | fgrep NOQUEUE
--
Martin
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
Use AWK
Like this:
cat /var/log/maillog | awk '{ if ($1=="May" && $2=="7") print $0 }' | grep
NOQUEUE
Newton Pasqualini Filho
newtonpasqual...@gmail.com
Em 07/05/2013, às 11:03, Reindl Harald escreveu:
> Hi
>
> i would like a grep of all records from the previous
> day with "NOQUEUE" in a