Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data matching 1

Status
Not open for further replies.

alan147

Technical User
Nov 15, 2002
128
GB
Good afternoon

I urgently need to select data from one file where the entry in field 1 matches the data in field 1 of a second file does anyone have a solution?

Thanks

Alan
 
A starting point:
Code:
awk 'NR==FNR{t[$1];next}($1 in t)' "second file" "one file" > output

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Great, you've really helped me out.

Thanks very much.

Alan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top