1

Sort field and uniq

view story
linux-howto

http://www.unix.com – I have a flatfile A.txt Code: 2012/12/04 14:06:07 |trees|Boards 2, 3|denver|mekong|mekong12 2012/12/04 17:07:22 |trees|Boards 2, 3|denver|mekong|mekong12 2012/12/04 17:13:27 |trees|Boards 2, 3|denver|mekong|mekong12 2012/12/04 14:07:39 |rain|Boards 1|tampa|merced|merced11 How do i sort and get latest date time with uniq duplicate field 6? Out put will be Code: 2012/12/04 17:13:27 |trees|Boards 2, 3|denver|mekong|mekong12 2012/12/04 14:07:39 |rain|Boards 1|tampa|merced|merced11 I used this code but did not work Code: sort -t\| +5 -6 0 -1 A.txt | uniq Thanks for showi (HowTos)