'man uniq' documents the -f=N and -s=N options which make uniq skip the first N fields/characters respectively when comparing lines, but how would you force uniq to skip the last N fields/characters?
After that you'll have to pipe the output through `rev` again, to get some readable information.
tangens
2010-02-13 16:08:51
yes tangens, thanks
ennuikiller
2010-02-13 16:11:02
thanks to ghostdog for pointing out the necessity of sort!
ennuikiller
2010-02-13 17:54:16
anyone care to come up with an argument as to why this behaviour isn't incorporated into uniq as a command line switch/option?
Julius
2010-02-19 12:23:09
+2
A:
you will need to sort your data first if you want to use uniq
sort file | rev | uniq -f 10 | rev
ghostdog74
2010-02-13 17:51:48
uniq without sort removes consecutive identical line which can definitely be useful.
R Samuel Klatchko
2010-02-13 17:56:42