The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
compare two files
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Forum Rules
FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
compare two files
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
01-27-2007
aigles
Registered User
Join Date: Apr 2004
Location: Bordeaux, France
Posts: 1,211
A possible solution :
Code:
awk 'NR==FNR { keys[$1]++ ; next } $1 in keys' file2 file1
Jean-Pierre.
aigles
View Public Profile
Find all posts by aigles