find duplicated lines and output one instance

May 25, 2010 at 22:38:24
Specs: Windows 7
Hi. am very very new in Unix.
I have a file of errors and Im suppose to detect
the duplicated lines ( apart from the time is
considered duplicated ) and just output 1 time
and ( extra : show how many times )
thanks..



See More: find duplicated lines and output one instance

Report •

#1
May 26, 2010 at 09:26:40
The unix sort command has a unique option that suppresses all but one line having equal keys. You won't be able to sort on the entire because of the time.

You might post a short example of your log file, and I'll give you a further opinion.

How many times is more difficult. You'd have to write a script and count the number of lines.


Report •
Related Solutions


Ask Question