![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sorting Files by date and moving files in date order | rebel64 | Shell Programming and Scripting | 2 | 03-11-2008 12:45 PM |
| Sorting by date and time | padmundo | UNIX for Dummies Questions & Answers | 7 | 07-10-2007 05:04 AM |
| Date Sorting | LiquidChild | Shell Programming and Scripting | 14 | 05-29-2007 07:34 AM |
| Sorting a date coulumn | rinku11 | Shell Programming and Scripting | 2 | 05-15-2007 07:51 PM |
| sorting on date | Duckman | UNIX for Dummies Questions & Answers | 6 | 03-29-2001 04:32 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
date sorting
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 |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|