1 |
On Monday 28 January 2008 16:43:29 Jan Seeger wrote: |
2 |
|
3 |
> perl -npe '/^\[(\d+)\]/; @times = localtime $1; $times[4]++; |
4 |
> $times[5]+=1900; s/\[\d+\]/$times[2]:$times[1] |
5 |
> $times[3].$times[4].$times[5]/;' |
6 |
> |
7 |
> Just pipe your log through that and you will get beautiful (european) |
8 |
> dates instead of timestamps. |
9 |
|
10 |
> use perl or die()^^. |
11 |
|
12 |
s/or/and/ :-) |
13 |
|
14 |
> I got it using the following jumbled one-liner: |
15 |
|
16 |
Nope. I pasted that into a file called pipe, and it still returns Unix time |
17 |
stamps, thus: |
18 |
|
19 |
$ grep completed /var/log/emerge.log | tail | ./pipe |
20 |
1201599475: ::: completed emerge (1 of 86) kde-base/arts-3.5.8 to / |
21 |
... |
22 |
|
23 |
Next? :-) |
24 |
|
25 |
-- |
26 |
Rgds |
27 |
Peter |
28 |
-- |
29 |
gentoo-user@l.g.o mailing list |