NUMDIFF(1)

✨ NAME ✨

numdiff β€” bestie, it compares similar files that have numeric fields in them πŸ’…

This is the manual page for numdiff, section 1 (User Commands). Sit down, grab a boba, we're doing this πŸ§‹


πŸ’– DESCRIPTION πŸ’–

okay so here's the whole vibe. You run it like this:

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
CURRNAME][-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

What it does: it compares putatively similar files line by line and field by field, ignoring small numeric differences or/and different numeric formats. Like, "these two files are basically the same, the numbers just wiggled a lil" β€” that's the whole point 🫢

Now, important vocab, bestie:

  • RANGE, RANGE1 and RANGE2 stand 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, sorry.
  • The given paths cannot refer to the same file, but one of them can be -, which refers to stdin. iconic.
Exit status: 1 if files differ, 0 if they are equal, -1 (255) in case of error. Memorize it, it's giving exam question πŸ“

🌸 the options 🌸

  • -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. so extra πŸ’…
  • -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. multi-char delims, she's fancy ✨
  • -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. close enough = good enough, no cap 🌈
  • -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. percentage girlies rise πŸ¦‹
  • -2, --strict β€” Consider two numerical values as equal only if both absolute and relative difference do not exceed the respective tolerance threshold. strict queen πŸ‘‘
  • -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 relative 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. pick your fighter πŸ₯Š
  • -#, --digits=NUM β€” Set to NUM the number of digits in the significands used in multiple precision arithmetic. big math energy πŸ”’
  • -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. only upward trends count πŸ“ˆ
  • -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. only downward trends count πŸ“‰
  • -I, --ignore-case β€” Ignore changes in case while doing literal comparisons. ABC = abc, we don't discriminate πŸ’œ
  • -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. C1 for file one, C2 for file two, cute little pair πŸŽ€
  • -t, --thousands-separator=C1C2 β€” Specify the characters representing the thousands separator in the two files to compare. one per file, obviously ✨
  • -g, --group-length=N1N2 β€” Specify the number of digits forming each group of thousands in the two files to compare. N1 and N2, one each 🧚
  • -p, --plus-prefix=C1C2 β€” Specify the (optional) prefixes for positive values used in the two files to compare. the little + guys 🫢
  • -n, --minus-prefix=C1C2 β€” Specify the prefixes for negative values used in the two files to compare. the little - guys 🫢
  • -e, --exponent-letter=C1C2 β€” Specify the exponent letters used in the two files to compare. e vs E drama resolved πŸ’…
  • -i, --imaginary-unit=C1C2 β€” Specify the characters representing the imaginary unit in the two files to compare. imaginary besties stay winning πŸ¦„
  • -X, --exclude=1:RANGE β€” Select the fields of the first file that have to be ignored. not me looking away πŸ™ˆ
  • -X, --exclude=2:RANGE β€” Select the fields of the second file that have to be ignored. also looking away πŸ™ˆ
  • -E, --essential β€” While printing the differences between the two compared files, show only the numerical ones. numbers only, periodt πŸ”₯
  • -U, --dummy β€” While printing the differences between the two compared files, neglect all the numerical ones (dummy mode). ignore the numbers, embrace the chaos πŸ’€
  • -b, --brief β€” Suppress all messages concerning the differences discovered in the structures of the two files. short and mysterious 😌
  • -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. she's talkative and we love her πŸ—£οΈ
  • -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 output common lines and display at most -'NUM' columns per line. side by side, like matching outfits πŸ‘―
  • --raw β€” Display the differences between the two compared files in raw format (not very convenient for humans). warning: not very convenient for humans fr fr, it's giving robot πŸ§ƒ
  • -q, --quiet, --silent β€” Suppress all the standard output. 🀫
  • -S, --statistics β€” Add some statistics to the standard output. data girlie behavior πŸ“Š
  • -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. selective blurring, iconic πŸ’«
  • -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. no questions asked 🌫️
  • -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. she's trying her best πŸ₯Ί
  • -H, --speed-large-files β€” During synchronization assume large files and many scattered small changes. big file energy, we go fast πŸƒβ€β™€οΈ
  • -f, --test-filter[=NUM] β€” Run only the filter and then show the results of its attempt to synchronize the two files. 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 output common lines and display at most -'NUM' columns per line. sneak peek mode πŸ‘€
  • -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). tabs get ✨flattened✨
  • -B, --binary β€” Treat both files as binary files (only meaningful under Doz/Windoz). Windows besties this one's for you πŸͺŸ
  • -l, --warnings-to=PATH β€” Redirect warning and error messages from stderr to the indicated file. yeet those warnings elsewhere πŸ“¬
  • -o, --output=PATH β€” Redirect output from stdout to the indicated file. same but for the good stuff πŸ“¬
  • -h, --help β€” Show help message and predefined settings. πŸ†˜
  • -v, --version β€” Show version number, Copyright, Distribution Terms and NO-Warranty. the receipts 🧾

πŸŽ€ 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'

that's the default fit, and it eats every time πŸ’…


Copyright Β© 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/licenses/gpl.html>.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. read it and weep, bestie 😭

πŸ’œ 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 command

info numdiff

should give you access to the complete manual. go read it, it's giving lore πŸ“š


and that's the whole page, bestie!! this was numdiff version 5.9.0, dated January 2017, living in section NUMDIFF(1) of your friendly neighborhood manual. mwah, go compare some numbers πŸ«ΆπŸ’–βœ¨