Hello. There are two files ( file1.txt and file2.txt ), their contents are as follows, file1:
abcd file2:
abxz I am writing a script to display the difference in the third file from the new line:
grep -F -v -f file2.txt file1.txt >> diff.txt
But the output is obtained only "cd", i.e. in one line.
I would be grateful for the help!
UPDATE: The problem was solved by adding | awk '{sub (/ $ /, "\ r"); print}'
diffutility for finding differences in files - Mikegrep -F -v -f file2.txt file1.txt | awk '{print $0,"\n"}' >> diff.txtgrep -F -v -f file2.txt file1.txt | awk '{print $0,"\n"}' >> diff.txt- Senior Pomidor