I'm new to linux and to shell programming. I have an assignment to create a shell script that shows all the folders, sub folders and files of the current directory. LS does this. But I must count how many duplicate lines each file has, and show the line that is repeated the most times in each file. I really have no idea where to start. How can I read/compare lines within a file? Thanks in advance!
Start with searching google also and checking out these results http://www.linuxquestions.org/questions/linux-software-2/finding-duplicate-lines-in-a-file-617441/ http://unstableme.blogspot.com/2008/03/remove-duplicates-without-sorting-file.html