Hi at all,
I have to sort a log file on timestamp field. That's field is the third!
a log file sample.....
1|EVTVOD-1-20060709_000614|2006/07/09-0:11:23|0.3.8
1|EVTVOD-1-20060709_000614|2006/07/09-0:11:16|0.3.8
1|EVTVOD-1-20060709_000614|2006/07/09-0:11:20|0.3.8
1|EVTVOD-1-20060709_000614|2006/07/09-0:11:29|0.3.8
1|EVTVOD-1-20060709_000614|2006/07/09-0:11:1|0.3.8
1|EVTVOD-1-20060709_000614|2006/07/09-0:11:17|0.3.8
Fixing this command .....
cut -d \| -f1,2,3,4 pippo |sort -k 3n,3n | more
1|EVTVOD-1-20060709_000614|2006/07/09-0:11:16|0.3.8
1|EVTVOD-1-20060709_000614|2006/07/09-0:11:17|0.3.8
1|EVTVOD-1-20060709_000614|2006/07/09-0:11:1|0.3.8
1|EVTVOD-1-20060709_000614|2006/07/09-0:11:20|0.3.8
1|EVTVOD-1-20060709_000614|2006/07/09-0:11:23|0.3.8
1|EVTVOD-1-20060709_000614|2006/07/09-0:11:29|0.3.8
You note that third row is in wrong place (should be the first one)
How can solve this problem?
thanx