On Monday 28 January 2008 16:43:29 Jan Seeger wrote:

> perl -npe '/^\[(\d+)\]/; @times = localtime $1; $times[4]++;
> $times[5]+=1900; s/\[\d+\]/$times[2]:$times[1]
> $times[3].$times[4].$times[5]/;'
>
> Just pipe your log through that and you will get beautiful (european)
> dates instead of timestamps.

> use perl or die()^^.

s/or/and/  :-)

> I got it using the following jumbled one-liner: 

Nope. I pasted that into a file called pipe, and it still returns Unix time 
stamps, thus:

$ grep completed /var/log/emerge.log | tail | ./pipe
1201599475:  ::: completed emerge (1 of 86) kde-base/arts-3.5.8 to /
...

Next?   :-)

-- 
Rgds
Peter
-- 
gentoo-user@lists.gentoo.org mailing list

Reply via email to