How do I merge FileA.txt and FileB.txt giving FileB.txt overwrite power using a bash script? [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How can I replace lines in a text file with lines from another file based on matching key fields? I want to merge the following files and I want the contents of FileB.txt to overwrite FileA.txt where there are common lines, but I don't want to completely replace FileA.txt with FileB.txt. For example: File A: # cat FileA.txt interface.1.type = ethernet interface.1 = A interface.1.ip = 192.168.1.1 interface.1