Merge two files and combine data
Dear friends, I need to merge two files, each file has 5 columns, I need to merge files based on first four columns. All fields do not have data and an empty field must be replaced with "Not Defined". Both the files have different numbers of rows.
Example:
file 1
a b c d e
a c d f
g f h j
File2
a b c d g
a c c b x
Output File
Name Value in file1 Value in file2
a b c d e g
a c d f Not Defined
g f h j Not Defined Not Defined
a c c c Not Defined x
Could somebody suggest a solution please. Many thanks in advance.
|