help tex_equalVersion 1.0.0

Title

tex_equal -- Compare ASCII text or binary files

Syntax

tex_equal
[,

file1(filename1)

file2(filename2)

display

range(numlist)

lines(integer)]

Main
* file1(filename1) Name of the first file.

* file2(filename2) Name of the second file.

Options
display Display differences if any.

range(numlist min=1 max=2) Select a specific range of the file.

lines(integer) Number of lines after first finding on range option.

* Required option

Description

tex_equal is aimed to compare the contents of file1 with file2. It is
extremely useful when dealing with many files to compare. The comparison is done line by line
e.g. line 1 in file1 against line 1 in file2. Furthermore, it allows to compare either the
whole file or an extract using the range and/or lines options. Use this command to compare
any type of ASCII text or binary files.

While the command has not been set to display discrepancies it's possible to do so using the
display option. Finally, the program allows opening
each of the files (using the default program set by the computer) just clicking on the icon open.

Options description

Main

file1(filename1) name of the first file. It is important to add the extension of the file
like .do, .ado or .txt, among others.

file2(filename2) name of the second file. As before, its important to add the
extension of the file.

Options

display present existing discrepancies between files, if any, in
the result screen. When this option is active, lines with discrepancies belonging to each of
the files, will appear in the result screen. Furthermore, this option presents the line's number
and each the complete text in both files present at that line.

range(numlist min=1 max=2) specify range of lines over which the analysis should be done. If
two elements are specified, the comparison will be done over that section of the file. If only one
element is specified and lines option is also used, the section
will start in that line and conclude in the number of lines added through the lines option.
For example range(3) lines(10) will analyze the lines of a certain file from line 3 to line 13
because 10 lines ahead was specified.If lines option is missing and only one element is
specified in the range option, the comparison will start on the selected line until the end of the file.

lines(integer) if a complete range is provided in the range option, i.e. two
elements, this option is not allowed. It is useful only in the case that just one element
is specified. If lines is zero, the analysis will be done only in the line specified in the
range option.

Stored results

tex_equal stores the following in r():

r(comparison) is equal to 1 if files are the same or 0 otherwise

r(ndif) number of differences if any

r(file1) Name of filename1

r(file2) Name of filename2

Author

Santiago Garriga

Facultad de Ciencias Económicas (UNLP - Argentina)

LCSPP - World Bank

garrigasantiago@gmail.com

Also see

file, filefilter