I am new on linux bash script. I am asking to do a "diff" on 2 files and then add/change file1 based on the comparsion with file2. I knew I have to use "diff" and "sed" to do it, but I have no idea how to put them together. Anybody has any idea? What is the regular expression should i use for sed.
I am new on linux bash script. I am asking to do a "diff" on 2 files and then add/change file1 based on the comparsion with file2. I knew I have to use "diff" and "sed" to do it, but I have no idea how to put them together. Anybody has any idea? What is the regular expression should i use for sed.
Use patch, not sed.
However, if you just want file1 to be the same as file2, why not copy file2 to file1?
Recent comments
1 day 4 hours ago
1 day 9 hours ago
1 day 14 hours ago
1 day 16 hours ago
2 days 6 hours ago
2 days 6 hours ago
2 days 11 hours ago
2 days 18 hours ago
2 days 18 hours ago
2 days 20 hours ago