0

I have two text files one file contains values as

Id         Value
1         apple   
2         orange  
3         mango 
4         banana 
5         strawberry
6         papaya

In other file i have

Id        Value
6         strawberry 
4         banana
3         orange  
1         mango
2         papaya
5         straw berry

I have to match between Id's and the corresponding strings in the value column and find the string correctness. How can this be done? Can it be done with shell script or should i follow some other programming.

4
Contributors
4
Replies
19
Views
2 Years
Discussion Span
Last Post by parvai
1

does anybody say «hello», and «please» any more ?
just «do my stuff», and that's it ?

no "hello"?
no "please"?

no answer !

Votes + Comments
Ok please guide me
0

Sheela - Try this
awk -F'|' 'NR==FNR{c[$1$2]++;next};c[$1$2] > 0' file2 file1
- prints the lines from the file1 - which is the default action of the awk command.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.