Hi,
I want to compare 2 versions of a file. LogicalDoc is capable of comparing the metadata of different versions of a file but I want to be able to compare the actual document contents rather than the metadata. Is that possible?
Thanks for your help
How to configure file comparison?
Moderator: car031
Post
Re: How to configure file comparison?
Actually this is not possible, but thanks for letting us know about this.
Post
Re: How to configure file comparison?
Hi,
Thanks for your quick reply. I have another question regarding file comparison. it seems that one can only compare the metadata of 2 files at a time, is it possible to extend the number of files compared at a time?
Thanks.
Thanks for your quick reply. I have another question regarding file comparison. it seems that one can only compare the metadata of 2 files at a time, is it possible to extend the number of files compared at a time?
Thanks.
Post
Re: How to configure file comparison?
Extending Xerxes' solution, you can use more sophisticated tools than diff for displaying the differences.
wdiff
wdiff can be "too smart" at times, but I find it often useful for taking a quick glance at differences between configuration files. This script can be used for output with colors:
#!/bin/bash
RED=$'\e'"[1;31m"
GREEN=$'\e'"[1;32m"
RESET=$'\e'"[0m"
WDIFF_ARGS="-w$RED -x$RESET -y$GREEN -z$RESET --avoid-wraps"
wdiff $WDIFF_ARGS \
<(grep -vE '^([ \t]*#|^[ \t]*$)' $1) \
<(grep -vE '^([ \t]*#|^[ \t]*$)' $2) \
| less -R
On Ubuntu and other Debian-based systems, just apt-get install wdiff before using this script.
Meld
Meld is a nice GUI alternative, but its "Text filtering" feature has some issues. Instead of using text filtering, I remove comments altogether before showing the results in Meld. The drawback is losing the ability to edit the files while comparing them. Here's a simple script for using Meld:
#!/bin/bash
meld <(grep -vE '^([ \t]*#|^[ \t]*$)' $1) \
<(grep -vE '^([ \t]*#|^[ \t]*$)' $2)
wdiff
wdiff can be "too smart" at times, but I find it often useful for taking a quick glance at differences between configuration files. This script can be used for output with colors:
#!/bin/bash
RED=$'\e'"[1;31m"
GREEN=$'\e'"[1;32m"
RESET=$'\e'"[0m"
WDIFF_ARGS="-w$RED -x$RESET -y$GREEN -z$RESET --avoid-wraps"
wdiff $WDIFF_ARGS \
<(grep -vE '^([ \t]*#|^[ \t]*$)' $1) \
<(grep -vE '^([ \t]*#|^[ \t]*$)' $2) \
| less -R
On Ubuntu and other Debian-based systems, just apt-get install wdiff before using this script.
Meld
Meld is a nice GUI alternative, but its "Text filtering" feature has some issues. Instead of using text filtering, I remove comments altogether before showing the results in Meld. The drawback is losing the ability to edit the files while comparing them. Here's a simple script for using Meld:
#!/bin/bash
meld <(grep -vE '^([ \t]*#|^[ \t]*$)' $1) \
<(grep -vE '^([ \t]*#|^[ \t]*$)' $2)
ayaha
Post
you can compare only 2 files in same time
Re: How to configure file comparison?
adolforst wrote:Hi,
Thanks for your quick reply. I have another question regarding file comparison. it seems that one can only compare the metadata of 2 files at a time, is it possible to extend the number of files compared at a time?
Thanks.
you can compare only 2 files in same time
ayaha
Who is online
Users browsing this forum: No registered users and 9 guests