1

i have 2 file :

file 1:

abc
mno
pqd

file 2:

ump 10
abc 12
sfg 30
klp 45
mno 21
pqd 32
jkl 98
lkg 45

I want output like this:

abc 12
mno 21
pqd 32
0

1 Answer 1

2

Try join :

# join  <(sort file1) <(sort file2)
abc 12
mno 21
pqd 32
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.