So my question is, have a missed something?
hmm... the output of your last script
$VAR1 = [ 'Only in test1/: different1', 'Only in test2/: different2', 'Only in test2//common: common.txt~', 'Files test1//common/common.txt and test2//common/common.txt + differ' ]; --- test1//common/common.txt Wed Mar 8 11:41:08 2017 +++ test2//common/common.txt Wed Mar 8 11:44:35 2017 @@ -1 +1 @@ -This is a common line +This is a common line.
is very similar to the output diff -ru produces:
qwurx [shmem] ~/tmp/diff> diff -ur test1 test2 diff -ur test1/common/common.txt test2/common/common.txt --- test1/common/common.txt 2017-03-09 12:28:15.215474776 +0100 +++ test2/common/common.txt 2017-03-09 12:28:38.639837796 +0100 @@ -1 +1 @@ -This is a common line +This is a common line. Only in test2/common: common.txt~ Only in test1: different1 Only in test2: different2
and it is trivial to filter that output to resemble that of your script.
Perhaps you want to tell us what kind of output you are aiming for, and the purpose of it all?
In reply to Re: Recursive Directory Comparison and Export Differences
by shmem
in thread Recursive Directory Comparison and Export Differences
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |