LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 09-10-2001, 01:21 AM   #1
cowardnewbie
LQ Newbie
 
Registered: Sep 2001
Location: New York
Posts: 4

Rep: Reputation: 0
Question 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:marlinmuni:

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 !!!
 
Old 09-17-2001, 12:57 AM   #2
jose
LQ Newbie
 
Registered: Sep 2001
Location: Alb, NM
Distribution: RH 7.1, Deluxe Workstation
Posts: 3

Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and replace text in multiple file Bad_Bob Linux - Software 9 05-08-2008 03:31 AM
Python: find defined text string in a file, and replace the whole line Dark Carnival Programming 6 05-22-2007 07:02 AM
checking for duplicate lines in text files (vb.net) mrobertson Programming 11 08-01-2005 01:40 PM
How to find and change a specific text in a text file by using shell script Bassam Programming 1 07-18-2005 08:15 PM
Command to find file with text chamanrana Linux - Software 10 12-02-2004 11:47 AM


All times are GMT -5. The time now is 07:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration