LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How 2 find a duplicate word in a text file (https://www.linuxquestions.org/questions/programming-9/how-2-find-a-duplicate-word-in-a-text-file-6395/)

cowardnewbie 09-10-2001 01:21 AM

How 2 find a duplicate word in a text file
 
If I have this variable-length text file containing a record such as:

newone:batam elf: *:newone:
marlin:shark:marlin:omuni:

My quest is What Linux command can I use to find duplicate words in a stream of records, and display those lines on the screen?
I cannot find such command anywhere except those that show how to find files.

Thank you anyone for your help !!!

jose 09-17-2001 12:57 AM

I dont think that native linux will do that, but you can write a perl script in about 3 minutes to do exactly that.
-jbs


All times are GMT -5. The time now is 03:08 PM.