I have two files fileA and fileB.
I have to extract column1 from fileA like awk '{print $1}'
and then the output will be searched into other fileB and will save the matched records into a new file fileC in simple words like:
fileA
:
seg1 rec1
seg2 rec2
seg3 rec3
I need to retrieve column 1 by using awk command and this column 1 is searched into fileB
to retrieve the records like:
fileB
:
seg1 one
seg2 two
seg3 three
seg4 four
seg5 five
From fileA, column1 data is extracted and and this data is used to search in fileB and matched record is saved to a test file. My output should be like this:
fileC
:
seg1 one
seg2 two
seg3 three