Saya ingin mendapatkan (GNU) DIFF untuk mencetak hanya garis yang berbeda dalam satu file. Jadi diberikan
==> diffa.txt <==
line1
line2 - in a only
line3
line4 changed
line5
==> diffb.txt <==
line1
line3
line4 changed in b
line5
line6 in b only
saya ingin diff --someoption diffa.txt diffb.txt
menghasilkan
line2 - in a only
line4 changed
Berikut ini tampak seolah-olah itu harus membantu tetapi agak samar:
--GTYPE-group-format=GFMT
Similar, but format GTYPE input groups with GFMT.
--line-format=LFMT
Similar, but format all input lines with LFMT.
--LTYPE-line-format=LFMT
Similar, but format LTYPE input lines with LFMT.
LTYPE is `old', `new', or `unchanged'.
GTYPE is LTYPE or `changed'.
GFMT may contain:
%< lines from FILE1
%> lines from FILE2