Unix/Linux Go Back    



Join On A String

UNIX for Dummies Questions & Answers




Kindly Note - This is a Single User Post by Forum Member hexram Regarding:
Join On A String.
Please Follow The Primary Link Above to View the Full Discussion.

   
Old Unix and Linux 10-11-2012   -   Original Discussion by jimmyf
hexram hexram is offline
Registered User
 
Join Date: Jan 2008
Last Activity: 9 August 2015, 11:42 PM EDT
Posts: 20
Thanks: 5
Thanked 3 Times in 3 Posts
Maybe it should be:

Code:
awk 'NR==FNR { A[$1]=$1; next } $1 in A' file2 file1
                     ^
                  Missing

Sorry, just read the post and thought "this is the error"; just did not test it yet.
(I HATE variable spacing fonts! Had to edit this post too many times just to align the arrow with the error)

Moderator's Comments:
Nope. The code is fine.