Ignoring specific differences in diff
- by naumcho
When doing recursive diffs I want to ignore expected differences/translations - is there a way to do that with standard unix tools?
E.g.
file1:
1 ...
2 /path/to/something/ver1/blah/blah
3 /path/to/something/ver1/blah/blah
4 ...
file2:
1 ...
2 /path/to/something/ver2/blah/blah
3 /path/to/something/ver3/blah/blah
4 ...
I want to be able to do something like:
diff file1 file2 --ignore-transltion "ver1>ver2"
This should show only show me that line 3 is different
Does anyone know of a good way to do that? I can easily write a perl script to do it but i will end up re-implementing most of the rest of the functionality of 'diff'.
Update: My goal is to run this on directories with different versions of the same files with "diff -r" so I can spot unexpected differences in versions.