Tag Info

New answers tagged

0

The example you gave has no common lines. I assume that your actual file does. If so, you can do this: awk 'NR==FNR{a[$1][$2]++; next} {if($1 in a){if($2 in a[$1]){print}}}' file2 file1


1

diff -qrN is about as fast as it gets to compare two directory trees. The -q option makes it quit early when files differ. Since you expect the files to be identical most of the time, it doesn't matter all that much: the comparison tool has to read and compare the whole files anyway. The only improvement you can make on diff is to avoid checking out from ...


2

Interesting problem. Using Git itself might be an easy solution. The following demonstrates the comparison between Redmine's Subversion repository https://svn.redmine.org/redmine and its GitHub mirror https://github.com/redmine/redmine for tag 3.0.3: $ git clone https://github.com/redmine/redmine $ cd redmine $ git checkout 3.0.3 $ find -mindepth 1 ...



Top 50 recent answers are included