LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-24-2007, 11:20 AM   #1
vakharia Mahesh
LQ Newbie
 
Registered: May 2007
Posts: 2

Rep: Reputation: 0
print duplicate records only


Hi All Linuxee,
Just now I became new members and Hi to all !!
I have file in which there are various fields containing Date of Birth , Name , Id No.,Location. What I want is to print only all persons having same Date of Birth and residing in same city ? for that how to match the strings using awk or sed or perl ??
I have already tried with
awk '$1 == prev {print; prev = $1 }' foo > output
but not successful ?
Also pls eloborate how to match the numeric and strings if possible.
Thankq in advance for going through this !!

Last edited by vakharia Mahesh; 05-24-2007 at 11:22 AM.
 
Old 05-24-2007, 02:19 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS Zone Records - MX Records ddzc Linux - Software 8 05-24-2007 01:26 PM
1+0 records in how to disiable in DD command "1+0 records out" Kotresh Linux - Software 3 03-08-2007 08:57 AM
Print-to-file print driver to print PDF Bill Fox Linux - General 3 05-02-2006 04:15 PM
Bash - Deleting duplicate records Wire323 Programming 5 12-04-2005 08:51 AM
Detecting duplicate keys in records. carl.waldbieser Programming 15 09-15-2005 06:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:27 PM.

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
Open Source Consulting | Domain Registration