Skip to content

Commit 27c225e

Browse files
committed
Add the specific sed statement to recover the second output file to
the comments.
1 parent b1b4f94 commit 27c225e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Tools/scripts/ndiff.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# ndiff file1 file2 -- a human-friendly file differencer.
77

88
# $Revision$
9-
# $NoKeywords: $
109

1110
# SequenceMatcher tries to compute a "human-friendly diff" between
1211
# two sequences (chiefly picturing a file as a sequence of lines,
@@ -52,6 +51,12 @@
5251
# 3) Lines beginning with "? " attempt to guide the eye to intraline
5352
# differences, and were not present in either input file.
5453
#
54+
# COROLLARY:
55+
# On Unix, the second file can be recovered by piping the output through
56+
# sed -n '/^[+ ] /s/^..//p'
57+
# Modifications to recover the first file are left as an exercise for
58+
# the reader.
59+
#
5560
# NOTE on junk: the module-level names
5661
# IS_LINE_JUNK
5762
# IS_CHARACTER_JUNK

0 commit comments

Comments
 (0)