I want to lookup filea with fileb,filec and filed.
If entry in filea exist in fileb and filec mark Y and then if entry in filea exist in filed mark as Y.
Final output should have all the entries from filea.
Quote:
filea:
abc
def
ghi
jkl
fileb:
abc,tt
def,kk
filec:
abc,ii
ghi,nn
filed:
ghi,aa
jkl,mm
output:
filea,fileb&c,filed
abc,Y,
def,,
ghi,,Y
jkl,,Y
|
This prints only matching entries from file a in fileb i want all entries from filea if it exists or not in fileb
Code:
nawk -F"|" 'NR==FNR{a[$1];next} $1 in a{print $1} filea fileb