Is awk capable of comparing a multilined record to a baseline record and outputing the difference?
For example..
Record 1 (Base line)
Record 2
Desired output:
I need the "Name:" field to identify what the record is and then I would like just the altered fields listed in the output. I'm trying to use this concept for auditing purposes.
If this is possible then please let me know what "concepts" of awk I would need to use to get this to work. I'm pretty new to awk but I have confidence that I could figure it out with a little help -- I just don't know how to do the comparing. of Field N from record 1 to Field N of Record 2.
For example..
Record 1 (Base line)
Code:
--------------
Name: Joseph Smith
Phone: 555-555-1234
Address: 801 Somewhere Ln.
Schedule: 08:00 - 17:00
----------------
Record 2
Code:
--------------
Name: Joseph Smith
Phone: 555-555-9876
Address: 801 Somewhere Ln.
Schedule: 08:00 - 20:00
----------------
Desired output:
Code:
--------------
Name: Joseph Smith
Phone: 555-555-9876
Schedule: 08:00 - 20:00
----------------
I need the "Name:" field to identify what the record is and then I would like just the altered fields listed in the output. I'm trying to use this concept for auditing purposes.
If this is possible then please let me know what "concepts" of awk I would need to use to get this to work. I'm pretty new to awk but I have confidence that I could figure it out with a little help -- I just don't know how to do the comparing. of Field N from record 1 to Field N of Record 2.