Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
NUMDIFF(1)			  User Commands 		      NUMDIFF(1)

NAME
     numdiff - compare similar files with numeric fields

DESCRIPTION
     Usage: numdiff -h|--help|-v|--version   or

     numdiff	[-s    IFS][-D	  DELIMS][-a   THRVAL[:RANGE|:RANGE1:RANGE2]][-r
     THRVAL[:RANGE|:RANGE1:RANGE2]][-2][-F  NUM][-#   NUM][-P][-N][-I][-c   CUR-
     RNAME][-d	C1C2][-t  C1C2][-g  N1N2][-p C1C2][-n C1C2][-e C1C2][-i C1C2][-X
     1:RANGE][-X 2:RANGE][-E][-U][-b][-V][-O[NUM]][--raw][-q][-S][-z 1:RANGE][-z
     2:RANGE][-Z 1:RANGE][-Z 2:RANGE][-m][-H][-f[NUM]][-T][-B][-l PATH][-o PATH]
     FILE1 FILE2

     Compare putatively similar files line by line and field by field,	ignoring
     small numeric differences or/and different numeric formats.

     RANGE,  RANGE1  and RANGE2 stay for a positive integer value or for a range
     of integer values, like 1-, 3-5 or -7.  The two arguments after the options
     are the names of the files to compare.  The complete  paths  of  the  files
     should  be given, a directory name is not accepted.  The given paths cannot
     refer to the same file but one of them can be "-", which refers to stdin.

     Exit status: 1 if files differ, 0 if they are equal, -1 (255)  in	case  of
     error

     -s, --separators=IFS

	    Specify  the  set of characters to use as delimiters while splitting
	    the input lines into fields (The default set of delimiters is space,
	    tab and newline).  If IFS is prefixed with 1: or 2:, use  the  given
	    delimiter  set  only for the lines from the first or the second file
	    respectively

     -D, --delimiters=DELIMS

	    Specify the set of strings to use as delimiters while splitting  the
	    input lines into fields (The default set of delimiters is space, tab
	    and  newline).   If  DELIMS is prefixed with 1: or 2:, use the given
	    delimiter set only for the lines from the first or the  second  file
	    respectively

     -a, --absolute-tolerance=THRVAL[:RANGE|:RANGE1:RANGE2]

	    Set  to  THRVAL the maximum absolute difference permitted before two
	    numeric fields are regarded  as  different	(The  default  value  is
	    zero).   If  a RANGE is given, use the specified threshold only when
	    comparing fields whose positions lie in RANGE.  If both  RANGE1  and
	    RANGE2  are  given	and have the same length, then use the specified
	    threshold when comparing a field of FILE1 lying in RANGE1  with  the
	    corresponding field of FILE2 in RANGE2

     -r, --relative-tolerance=THRVAL[:RANGE|:RANGE1:RANGE2]

	    Set  to  THRVAL the maximum relative difference permitted before two
	    numeric fields are regarded  as  different	(The  default  value  is
	    zero).   If  a RANGE is given, use the specified threshold only when
	    comparing fields whose positions lie in RANGE.  If both  RANGE1  and
	    RANGE2  are  given	and have the same length, then use the specified
	    threshold when comparing a field of FILE1 lying in RANGE1  with  the
	    corresponding field of FILE2 in RANGE2

     -2, --strict

	    Consider  two  numerical  values  as equal only if both absolute and
	    relative difference do not exceed the respective tolerance threshold

     -F, --formula=NUM

	    Use the formula indicated by NUM to compute the relative errors.  If
	    'NUM' is 0 use the classic formula.  If 'NUM' is 1 compute the rela-
	    tive errors by considering the values in FILE1 as sample values.  If
	    'NUM' is 2 compute the relative errors by considering the values  in
	    FILE2 as sample values.

     -#, --digits=NUM

	    Set to NUM the number of digits in the significands used in multiple
	    precision arithmetic

     -P, --positive-differences

	    Ignore all differences due to numeric fields of the second file that
	    are less than the corresponding numeric fields in the first file

     -N, --negative-differences

	    Ignore all differences due to numeric fields of the second file that
	    are greater than the corresponding numeric fields in the first file

     -I, --ignore-case

	    Ignore changes in case while doing literal comparisons

     -c, --currency=CURRNAME

	    Set  to  CURRNAME  the  currency  name for the two files to compare.
	    CURRNAME must be prefixed with 1: or 2: to specify the currency name
	    only for the first or the second file

     -d, --decimal-point=C1C2

	    Specify the characters representing the decimal  point  in	the  two
	    files to compare

     -t, --thousands-separator=C1C2

	    Specify  the  characters representing the thousands separator in the
	    two files to compare

     -g, --group-length=N1N2

	    Specify the number of digits forming each group of thousands in  the
	    two files to compare

     -p, --plus-prefix=C1C2

	    Specify  the (optional) prefixes for positive values used in the two
	    files to compare

     -n, --minus-prefix=C1C2

	    Specify the prefixes for negative values used in the  two  files  to
	    compare

     -e, --exponent-letter=C1C2

	    Specify the exponent letters used in the two files to compare

     -i, --imaginary-unit=C1C2

	    Specify  the  characters  representing the imaginary unit in the two
	    files to compare

     -X, --exclude=1:RANGE

	    Select the fields of the first file that have to be ignored

     -X, --exclude=2:RANGE

	    Select the fields of the second file that have to be ignored

     -E, --essential

	    While printing the differences between the two compared  files  show
	    only the numerical ones

     -U, --dummy

	    While  printing  the  differences between the two compared files ne-
	    glect all the numerical ones (dummy mode)

     -b, --brief

	    Suppress all messages concerning the differences discovered  in  the
	    structures of the two files

     -V, --verbose

	    For  every	couple of lines which differ in at least one field print
	    an header to show how these lines appear in the two compared files

     -O, --overview[=NUM]

	    Display a side by side difference listing of the two  files  showing
	    which lines are present only in one file, which lines are present in
	    both  files  but  with one or more differing fields, and which lines
	    are identical.  If 'NUM' is zero or is not specified, output at most
	    130 columns per line.  If 'NUM' is a positive number, output at most
	    'NUM' columns per line.  If 'NUM' is a negative number, do not  out-
	    put common lines and display at most -'NUM' columns per line.

     --raw

	    Display the differences between the two compared files in raw format
	    (not very convenient for humans)

     -q, --quiet, --silent

	    Suppress all the standard output

     -S, --statistics

	    Add some statistics to the standard output

     -z, --blur-if-numerical=1:RANGE

	    Select  the  fields of the first file that have to be blurred during
	    the synchronization procedure only if they turn out to be numeric

     -z, --blur-if-numerical=2:RANGE

	    Select the fields of the second file that have to be blurred  during
	    the synchronization procedure only if they turn out to be numeric

     -Z, --blur-unconditionally=1:RANGE

	    Select  the fields of the first file that have to be unconditionally
	    blurred during the synchronization procedure

     -Z, --blur-unconditionally=2:RANGE

	    Select the fields of the second file that have to be unconditionally
	    blurred during the synchronization procedure

     -m, --minimal

	    During synchronization try hard to find a smaller set of changes

     -H, --speed-large-files

	    During synchronization assume large files and many	scattered  small
	    changes

     -f, --test-filter[=NUM]

	    Run only the filter and then show the results of its attempt to syn-
	    chronize  the two files.  If 'NUM' is zero or is not specified, out-
	    put at most 130 columns per line.  If 'NUM' is  a  positive  number,
	    output  at most 'NUM' columns per line.  If 'NUM' is a negative num-
	    ber, do not output common lines and display at most  -'NUM'  columns
	    per line.

     -T, --expand-tabs

	    Expand  tabs to spaces in output while displaying the results of the
	    synchronization procedure (meaningful only together with  option  -O
	    or -f)

     -B, --binary

	    Treat both files as binary files (only meaningful under Doz/Windoz)

     -l, --warnings-to=PATH

	    Redirect  warning  and  error  messages from stderr to the indicated
	    file

     -o, --output=PATH

	    Redirect output from stdout to the indicated file

     -h, --help

	    Show help message and predefined settings

     -v, --version

	    Show version number, Copyright, Distribution Terms and NO-Warranty

Default numeric format (for both files to compare):
     Currency name = ""
     Decimal point = `.'
     Thousands separator = `,'
     Number of digits in each thousands group = 3
     Leading positive sign = `+'
     Leading negative sign = `-'
     Prefix for decimal exponent = `e'
     Symbol used to denote the imaginary unit = `i'

COPYRIGHT
     Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,  2013,  2014,
     2015, 2016, 2017  Ivano Primi <ivprimi@libero.it>
     License  GPLv3+:  GNU  GPL  version  3  or  later,  see <http://gnu.org/li-
     censes/gpl.html>.
     This is free software: you are free to change and redistribute  it.   There
     is NO WARRANTY, to the extent permitted by law.

SEE ALSO
     The  full	documentation for numdiff is maintained as a Texinfo manual.  If
     the info and numdiff programs are properly installed at your site, the com-
     mand

	    info numdiff

     should give you access to the complete manual.

numdiff 5.9.0			  January 2017			      NUMDIFF(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=numdiff&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help