Page 1 of 1

Count Duplicate Lines

Posted: Mon Sep 19, 2011 6:14 pm
by Vegarari
Hello,
Anybody know how to count duplicate lines?
I don't want to delete them, just need to know how many.

Posted: Mon Sep 19, 2011 7:17 pm
by MudGuard
Check the number of lines (either go to end of file, or use Alt-Enter) and remember it.

Do a sort with deleting duplicate lines.

Again, note the number of lines, and take the difference to the first number of lines (that's the number you are looking for).

Now do edit - undo (Ctrl-Z) to restore the file.

Posted: Mon Sep 19, 2011 7:32 pm
by MudGuard
I just noted something.

New recipe:

1. Do a sort with deleting duplicate lines (Tools - Sort).

2. Have a look at the statusbar, it says how many lines were deleted.

3. Undo (Ctrl-Z).