thendal
Programmer
- Aug 23, 2000
- 284
I need to compare two files and get what are lines got modified from file1 to file2 and and what are lines got deleted from file1 to file2 and what are lines get newly added from file1 to file2 . Something like three files
First file will have ..Lines that got changed
Second file will have ..Lines got deleted
Third file will have ..lines got newly added.
Is there a tool avaliable to do this ...i tried diff command ...output is something like this
diff file1 file2
1c1
< 23|Test|Check
---
> 23|Test23|Check
3,4c3
< 25|Tester|Checker
< 26|asdf|qwer
---
> 26|asdf|qwered
5a5
> 28|Addeed|newadd
i understand 'c' means compare and 'a' means newly added
now i don't know how to extract as three files any help will be appreciated
First file will have ..Lines that got changed
Second file will have ..Lines got deleted
Third file will have ..lines got newly added.
Is there a tool avaliable to do this ...i tried diff command ...output is something like this
diff file1 file2
1c1
< 23|Test|Check
---
> 23|Test23|Check
3,4c3
< 25|Tester|Checker
< 26|asdf|qwer
---
> 26|asdf|qwered
5a5
> 28|Addeed|newadd
i understand 'c' means compare and 'a' means newly added
now i don't know how to extract as three files any help will be appreciated