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,RANGE1andRANGE2stand for a positive integer value or for a range of integer values, like1-,3-5or-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:1if files differ,0if 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.) IfIFSis prefixed with1:or2:, 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.) IfDELIMSis prefixed with1:or2:, 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 toTHRVALthe maximum absolute difference permitted before two numeric fields are regarded as different. (The default value is zero.) If aRANGEis given, use the specified threshold only when comparing fields whose positions lie inRANGE. If bothRANGE1andRANGE2are given and have the same length, then use the specified threshold when comparing a field ofFILE1lying inRANGE1with the corresponding field ofFILE2inRANGE2. close enough = good enough, no cap π-r,--relative-tolerance=THRVAL[:RANGE|:RANGE1:RANGE2]β Set toTHRVALthe maximum relative difference permitted before two numeric fields are regarded as different. (The default value is zero.) If aRANGEis given, use the specified threshold only when comparing fields whose positions lie inRANGE. If bothRANGE1andRANGE2are given and have the same length, then use the specified threshold when comparing a field ofFILE1lying inRANGE1with the corresponding field ofFILE2inRANGE2. 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 byNUMto compute the relative errors. If'NUM'is0use the classic formula. If'NUM'is1compute the relative errors by considering the values inFILE1as sample values. If'NUM'is2compute the relative errors by considering the values inFILE2as sample values. pick your fighter π₯-#,--digits=NUMβ Set toNUMthe 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 toCURRNAMEthe currency name for the two files to compare.CURRNAMEmust be prefixed with1:or2: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.C1for file one,C2for 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.N1andN2, 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.evsEdrama 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 most130columns 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 most130columns 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-Oor-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 π
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 π«Άπβ¨
π¦ where this page comes from
- debian bookworm: numdiff 5.9.0-1+b1 Β· GPL-3.0-or-later
- debian trixie: numdiff 5.9.0-2 Β· GPL-3.0-or-later
- nixos 26.05: numdiff 5.9.0
- nixpkgs unstable: numdiff 5.9.0
- ubuntu jammy: numdiff 5.9.0-1 Β· GPL-3.0-or-later
- ubuntu noble: numdiff 5.9.0-1 Β· GPL-3.0-or-later
- ubuntu questing: numdiff 5.9.0-2
- ubuntu resolute: numdiff 5.9.0-2build1 Β· GPL-3.0-or-later
- ubuntu stonking: numdiff 5.9.0-2build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms