linux Script required for word by word comaprison from 2 carat separated files.
I have 2 carat separated files which consist of userid(first field) and his corresponding entry in carat separated.I want the the output which is given as below.
I required first field as userid and their all differences in carat separated.
FILE 1: A1.TXT
A1^admin=false^login=true^su=true^daemon=false^rlogin=true^sugroups=ALL
A3^admin=false^login=true^su=true^daemon=true^rlogin=true^sugroups=ALL
A5^admin=false^login=true^su=true^daemon=true^rlogin=true^sugroups=ALL
FILE 2: A2.TXT
A1^admin=false^login=false^su=true^daemon=true^rlogin=true^sugroups=ALL
A3^admin=true^login=true^su=true^daemon=true^rlogin=true^sugroups=ALL
A5^admin=true^login=true^su=true^daemon=true^rlogin=false^sugroups=ALL
OUTPUT SHOULD BE AS GIVEN BELOW:
mismatch! file 1: A1^login=true^daemon=false
file 2: A1^login=false^daemon=true
mismatch! file 1: A3^admin=false
file 2: A3^admin=true
mismatch! file 1: A5^admin=false^rlogin=true
file 2: A5^admin=true^rlogin=false
I will be very thankful if anyone can post the linux shell script for the same.
Regards,
Raj
Last edited by rajeevdvedi2006; 05-29-2013 at 06:31 AM.
Reason: Small correction done.
|