By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How to? Find duplicate lines in text file

Does TCC provide a simple and straightforward way to find duplicate lines in a text file?

It seems that TPIPE /dup would easily take care of it, but it's a little too advanced for me in that it finds duplicate lines (as determined by the starting column and length) over the whole file.

In this case I am only interested in CONSECUTIVE duplicate lines which it does not seem to support. Not in an obvious way at least.

(I am aware that this case would be easy to handle with a simple loop in a batch file, but having direct support would be easier and faster. I guess an external tool like awk would also take care of it, but using only TCC would be preferable).

ETA: After trying out some external tools I found that applying uniq (from UnxUtils) without sorting the file first does exactly what I want. So that works well for me.

It would still be interesting to know if you can do the same using only built-in TCC functionality.
Last edited:

Similar threads