Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Help in UNIX script

$
0
0
HI want to make a script in unix .I have 2 files with same structure with pipe as a delimiter.

Now first i want to check if column1(eid)-->file1 is present in column1(eid)-->file2,if so then it will check whether column 4,5,6(either of these columns) of file 1 are having any mismatches with file 2 of col 4,5,6.If mismatches then it will print both the record from file 1 and file 2 and mark a mail also...

Below is the sample explanation...

file1:

col1|col2|col3|col4

a|mum|kol|delh

b|chec|pune|indo

c|dwar|fran|ter file2:

col1|col2|col3|col4

a|mum|agh|delh

b|chec|pune|tyu

d|rty|hjk|uyt

c|dwar|fran|ter output:

file3 col1|col2|col3|col4

a|mum|kol|delh

a|mum|agh|delh ------since col3 id diff

b|chec|pune|indo

d|rty|hjk|uyt ------since col4 is diff

Viewing all articles
Browse latest Browse all 16232

Latest Images

Trending Articles



Latest Images