Manual Reference Pages  - chardiff (1)

NAME

chardiff - compare a test file and a reference file character by character within lines
 

CONTENTS

Description
Options
Examples
See Also
License
Copyright
Acknowledgements
Authors

SYNOPSIS

chardiff [options...]

DESCRIPTION

chardiff compares a test file to a reference file character by character within lines The output format is "line_number: clause1 clause2 ... clauseN". Each clause specifies a character position range "Start-End". Clauses are separated from each other and the line number field by a single space. If the -x parameter is used the corresponding differing characters are emitted immediately after the character range as "(from_text/from_ref)". EOL characters are counted in the clause ranges but are not emitted. Line and character positions start at one. If the first character of the first line differs it will be described as "1: 1-1".

Exit status is 0 for no differences found, 1 for difference found, other values for an error.

chardiff may be obtained as part of the drm_tools package from: http://sourceforge.net/projects/drmtools/

OPTIONS

--testfile,-t <TESTFILE>
  Name of the test file.

--reffile,-r <REFFILE>
  Name of the reference file.

-case-insensitive,-c
  Use case insensitive comparisons. Default is case sensitive.

--line-buffer,-b <N>
  Line buffer size, defaults to 65536. This must be larger than all input lines which will be processed.

--text,-x
  Also show text at the positions which differ. Default is to only show the positions that differ.

-h -help --help -? --??
  Print the help message. (Default - do not print help message.)

-i Emit version, copyright, license and contact information.( Default - do not emit information.)

EXAMPLES

% cat >text.txt <<EOD
abcDEFEFdef
abdfredddgstmuchlonger
testcasesensitivity
foobar
EOD
% cat >ref.txt <<EOD
abdfredddgstmuchlonger
abcDEFEFdef
TestCaseSensitivity
EOD
 

% chardiff -t text.txt -r ref.txt
1: 3-8 10-12 13-23
2: 3-8 10-12 13-23
3: 1-1 5-5 9-9
4: 1-7
 

% chardiff -t text1.txt -r ref1.txt -x -c
1: 3-8(cDEFEF/dfredd) 10-12(ef/gst) 13-23(/muchlonger)
2: 3-8(dfredd/cDEFEF) 10-12(gst/ef) 13-23(muchlonger/)
4: 1-7(foobar/)
 

SEE ALSO

none

LICENSE

GNU General Public License 2

COPYRIGHT

Copyright (C) 2015 David Mathog and Caltech.

ACKNOWLEDGEMENTS

none

AUTHORS

David Mathog, Biology Division, Caltech <mathog@caltech.edu>


drm_tools chardiff (1) 0.0.1 JAN 26 2015
Generated by manServer 1.07 from /usr/common/man/man1/chardiff.1 using man macros.