diff options
author | Guido van Rossum <guido@python.org> | 1998-05-08 21:04:06 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-05-08 21:04:06 (GMT) |
commit | 27c225e82651088466df607084ea2363373228f0 (patch) | |
tree | a8a94bd07ffd3d4c7c73b4523b0fa26a9d6f9fc9 /Tools/scripts/ndiff.py | |
parent | b1b4f94527dd7c28f33c7d1ece0057b88e421d01 (diff) | |
download | cpython-27c225e82651088466df607084ea2363373228f0.zip cpython-27c225e82651088466df607084ea2363373228f0.tar.gz cpython-27c225e82651088466df607084ea2363373228f0.tar.bz2 |
Add the specific sed statement to recover the second output file to
the comments.
Diffstat (limited to 'Tools/scripts/ndiff.py')
-rwxr-xr-x | Tools/scripts/ndiff.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Tools/scripts/ndiff.py b/Tools/scripts/ndiff.py index 2ba5e53..4767d1f 100755 --- a/Tools/scripts/ndiff.py +++ b/Tools/scripts/ndiff.py @@ -6,7 +6,6 @@ # ndiff file1 file2 -- a human-friendly file differencer. # $Revision$ -# $NoKeywords: $ # SequenceMatcher tries to compute a "human-friendly diff" between # two sequences (chiefly picturing a file as a sequence of lines, @@ -52,6 +51,12 @@ # 3) Lines beginning with "? " attempt to guide the eye to intraline # differences, and were not present in either input file. # +# COROLLARY: +# On Unix, the second file can be recovered by piping the output through +# sed -n '/^[+ ] /s/^..//p' +# Modifications to recover the first file are left as an exercise for +# the reader. +# # NOTE on junk: the module-level names # IS_LINE_JUNK # IS_CHARACTER_JUNK |