0

I have a large text file with a lot of lines of terms. Some lines repeat themselves. I want a program that gives me the lines that appear most often in the entire document.

0

On linux the command can read: sort <filename> | uniq -c

Missed the Windows part at first. On Windows the same can be accomplished when e.g. Cygwin has been installed or the sort and uniq from the GNU collection are installed.

  • The question is NOT tagged with Linux, it is with "Windows" instead ... – Pierre.Vriens Oct 4 '17 at 13:33
  • I can do that on Linux as well through a VM, thanks. – opportunityr Oct 4 '17 at 14:03
  • 1
    @Pierre.Vriens there are also the Gnu32 CoreUtils for Windows which include sort and uniq (hm, a little dated – but there might be a newer fork available somewhere), there's Bash in Windows 10, there's gow, busybox-w32 and there's Cygwin and CygwinPortable. Oh, and there's MobaXterm of course :) – Izzy Oct 4 '17 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.