compare first column of 2 file : while second have 2 column but first have one column [duplicate]
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
This question is an exact duplicate of:
If column matches another file, print every line with match (awk/grep)
3 answers
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
awk grep
marked as duplicate by steeldriver, schily, Jeff Schaller, slm⦠Jul 11 at 13:28
This question was marked as an exact duplicate of an existing question.
add a comment |Â
up vote
1
down vote
favorite
This question is an exact duplicate of:
If column matches another file, print every line with match (awk/grep)
3 answers
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
awk grep
marked as duplicate by steeldriver, schily, Jeff Schaller, slm⦠Jul 11 at 13:28
This question was marked as an exact duplicate of an existing question.
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
This question is an exact duplicate of:
If column matches another file, print every line with match (awk/grep)
3 answers
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
awk grep
This question is an exact duplicate of:
If column matches another file, print every line with match (awk/grep)
3 answers
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
This question is an exact duplicate of:
If column matches another file, print every line with match (awk/grep)
3 answers
awk grep
edited Jul 11 at 11:45
SivaPrasath
3,68311636
3,68311636
asked Jul 11 at 11:44
Saurabh Shukla
83
83
marked as duplicate by steeldriver, schily, Jeff Schaller, slm⦠Jul 11 at 13:28
This question was marked as an exact duplicate of an existing question.
marked as duplicate by steeldriver, schily, Jeff Schaller, slm⦠Jul 11 at 13:28
This question was marked as an exact duplicate of an existing question.
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
10
down vote
accepted
Try join
:
# join <(sort file1) <(sort file2)
abc 12
mno 21
pqd 32
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
10
down vote
accepted
Try join
:
# join <(sort file1) <(sort file2)
abc 12
mno 21
pqd 32
add a comment |Â
up vote
10
down vote
accepted
Try join
:
# join <(sort file1) <(sort file2)
abc 12
mno 21
pqd 32
add a comment |Â
up vote
10
down vote
accepted
up vote
10
down vote
accepted
Try join
:
# join <(sort file1) <(sort file2)
abc 12
mno 21
pqd 32
Try join
:
# join <(sort file1) <(sort file2)
abc 12
mno 21
pqd 32
edited Jul 11 at 12:21
answered Jul 11 at 11:48
SivaPrasath
3,68311636
3,68311636
add a comment |Â
add a comment |Â