On Feb 7, 5:39 am, Pierre <pierre.
> hi, I intended to use DIFF to compare 2 directories but doing so I
> found something that looks strange to me. it must be me who don't
> understand something.
> $ type dir_1.txt
> toto.txt;1
> toto.txt;2
> toto.txt;3
> toto.txt;4
> toto.txt;5
> toto.txt;6
> $ type dir_2.txt
> toto.txt;1
> toto.txt;6
> toto.txt;7
> toto.txt;8
> toto.txt;9
> toto.txt;10
> obviously version 2 to 5 were deleted while versions 7 to 10 where
> added.
> OK, DIFF finds the differences:
> $ diff/par/match=1/wid=80 dir_1.txt dir_2.txt
> --------------------------------------------------------------------------- ----
> File USER_DISK:[toto]dir_1.txt;1 | File USER_DISK:
> [toto]dir_2.txt;1
> ------------------- 2 ------------------------------------- 2
> -----------------
> toto.txt;2 |
> toto.txt;3 |
> toto.txt;4 |
> toto.txt;5 |
> ------------------- 7 ------------------------------------- 3
> -----------------
> | toto.txt;7
> | toto.txt;8
> | toto.txt;9
> | toto.txt;10
> --------------------------------------------------------------------------- ----
> Number of difference sections found: 2
> Number of difference records found: 8
> DIFFERENCES /WIDTH=80/MATCH=1/PARALLEL-
> USER_DISK:[toto]dir_1.txt;1-
> USER_DISK:[toto]dir_2.txt;1
> I can list the lines deleted from dir_1.txt
> $ diff/match=1/wid=80 dir_1.txt dir_2.txt/sep=master
> ************
> File USER_DISK:[toto]dir_1.txt;1
> 2 toto.txt;2
> 3 toto.txt;3
> 4 toto.txt;4
> 5 toto.txt;5
> ************
> Number of difference sections found: 2
> Number of difference records found: 8
> DIFFERENCES /WIDTH=80/MATCH=1/SEPARATED=MASTER-
> USER_DISK:[toto]dir_1.txt;1-
> USER_DISK:[toto]dir_2.txt;1
> or those added to dir_2.txt :
> $ diff/match=1/wid=80 dir_1.txt dir_2.txt/sep=revision
> ************
> File USER_DISK:[toto]dir_2.txt;1
> 3 toto.txt;7
> 4 toto.txt;8
> 5 toto.txt;9
> 6 toto.txt;10
> ************
> Number of difference sections found: 2
> Number of difference records found: 8
> DIFFERENCES /WIDTH=80/MATCH=1/SEPARATED=REVISION-
> USER_DISK:[toto]dir_1.txt;1-
> USER_DISK:[toto]dir_2.txt;1
> but if now I want to highlight the differences in term of add/delete,
> the fist command works:
> $ diff/match=1/wid=80 dir_1.txt/change="-" dir_2.txt
> ************
> File USER_DISK:[toto]dir_1.txt;1
> 1 toto.txt;1
> 2 - toto.txt;2
> 3 - toto.txt;3
> 4 - toto.txt;4
> 5 - toto.txt;5
> 6 toto.txt;6
> ************
> Number of difference sections found: 2
> Number of difference records found: 8
> DIFFERENCES /WIDTH=80/MATCH=1-
> USER_DISK:[toto]dir_1.txt;1/CHANGE_BAR=("-")-
> USER_DISK:[toto]dir_2.txt;1
> but the second don't (version 6 was not added...) :(
> $ diff/match=1/wid=80 dir_1.txt dir_2.txt/change="+"
> ************
> File USER_DISK:[toto]dir_2.txt;1
> 1 toto.txt;1
> 2 + toto.txt;6
> 3 + toto.txt;7
> 4 + toto.txt;8
> 5 + toto.txt;9
> 6 + toto.txt;10
> ************
> Number of difference sections found: 2
> Number of difference records found: 8
> DIFFERENCES /WIDTH=80/MATCH=1-
> USER_DISK:[toto]dir_1.txt;1-
> USER_DISK:[toto]dir_2.txt;1/CHANGE_BAR=("+")
> did I miss something about /CHANGE ?
> TIA, Pierre.
I don't know. It just does it differently in some cases.