How to? Find duplicate lines in text file

May 30, 2008
235
2
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
Thread starter Title Forum Replies Date
J ffind does not find files Support 4
Alpengreis List command: text truncated in find box (german) Support 9
R FIND command error Support 9
vefatica Find Files/Text dialog: does it work? Support 0
T FFind - can we display n number of lines after the find? Support 2
R How to? Find a specific file in subfolders Support 11
Patulus TCHistoryLog: TCC: (Sys) The system cannot find the path specified Support 15
D unzip fails to find valid license Support 3
R Find in screen buffer - find next behavior Support 0
thedave Problem chaining piped FIND commands in BTM Support 7
D CD doesn't always find everything Support 8
B Fixed FFIND doesn't find last character in file without CR/LF at EOF Support 1
M Fixed Cannot use the "Browse..." function in "Find files/text" dialogbox Support 2
vefatica FFIND /S, find directory with specified name? Support 7
D Why doesn't ffind find directory? Support 3
P OK, I can't find how to do this, but I know you wizards will... Support 5
noahcoad WAD cmd.exe under tcc doesn't find apps Support 4
S How to? Find installer downloaded by "option /u"? Support 11
M How to? Find out the total allocated size of a directory tree... Support 7
G Find files but ignore file extension in search Support 2
S CDD Doesn't Find Directory? Support 3
L File association: System cannot find the associated program Support 30
R How to use ffind to find older files? Support 9
Charles Dye Edit / Find dialog Support 0
J Find Files - changing folder Support 1
BobK Error from START cmd, "cannot find the file" Support 16
D ACTIVATE doesn't find windows Support 7
R A problem using find in list when word wrap? Support 2
nikbackm Find out when a process has stopped Support 5
J Find failure dialog box failure Support 0
J Problem with Find dialog Support 3
J Problem with %var:find=replace% syntax Support 5
S LIST and F for find Support 4
M TCC cannot find the path specified Support 4
M TCC Can't find WScript.exe where it says it is Support 0
A How to? TEE - duplicate output to STDERR Support 3
C duplicate files in multiple plugin sites Support 9
T Beta - duplicate install Support 7
S How to? Use wild cards in include list without duplicate processing Support 49
Charles Dye TYPE /X double-spacing long lines Support 2
old coot Spurious errors (triggered by "for" construct?) when adding/removing "echo" lines Support 2
vefatica Continued lines (^) in a library routine? Support 5
R Lines between COMMENT & ENDCOMMENT not ignored Support 7
A TCMD - Dir Command puts out blank lines? Support 16
T WAD Difference between TCC and CMD in handling multi-command lines Support 6
JohnQSmith Weird DIR output (missing lines) Support 1
fpefpe Documentation Comment lines? Support 2
nickles Fixed Executing long command lines in a batch generates file name errors Support 16
B %@lines doesn't count last line without cr/lf at eof Support 1
S Documentation HELP nit: @LINES Support 5

Similar threads