UDIFF(1)

πŸ“¦ version 2022.10.16, in opensuse-leap 16.0

okay so this is UDIFF(1) from SchilyΒ΄s USER COMMANDS, and bestie, it's literally three programs sharing one brain cell (affectionate): udiff, fdiff and fsdiff. πŸ’…

πŸŽ€ NAME πŸŽ€

udiff, fdiff, fsdiff β€” they show you where two files differ. that's the whole vibe check. ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

udiff [ options ] file1 file2

fdiff [ options ] file1 file2

fsdiff [ options ] file1 file2

πŸ’– DESCRIPTION πŸ’–

udiff shows what lines differ between two files. it supports arbitrary line lengths and treats binary files the same as text files β€” no cap, it does not care, it does not flinch. πŸ‘‘

It does not support many options or features and there is no best match resync mechanism, but the output is typically identical to the output from the classical UNIX diff(1). lowkey iconic behavior.

If called as fdiff or fsdiff, the POSIX output style is used and the nmatch=# resync default value is set to 1 line.

If called as fsdiff, the exit code is compatible to bdiff(1) and differences in the files still result in a zero exit code; only an error causes a non-zero exit code. This allows fsdiff to be used as a replacement for the bdiff program for SCCS. yes bestie, drop-in replacement, we love to see it 🫢

Since the performance of udiff is only a linear function of the file size, using fsdiff speeds up SCCS with large files. and since the differences reported by fsdiff are smaller that what bdiff reports, this helps to keep SCCS history files smaller. two wins, zero notes. 🌸

The normal output if called as udiff contains lines of these forms:

-------- 1 line deleted at %ld:
-------- %ld lines deleted at %ld:
-------- 1 line added at %ld:
-------- %ld lines added at %ld:
-------- 1 line changed at %ld from:
-------- %ld lines changed at %ld-%ld from:
-------- 1 line changed to %ld lines at %ld from:
-------- %ld lines changed to 1 line at %ld-%ld from:
-------- %ld lines changed to %ld lines at %ld-%ld from:
-------- to:

followed by blocks with the changed text. This is easier to read by humans than the POSIX output variant. facts are facts. πŸ’…


The POSIX output variant contains lines of these forms:

n1 a n3,n4
n1,n2 d n3
n1,n2 c n3,n4

where n1 and n2 represent lines file1 and n3 and n4 represent lines in file2. These lines resemble ed(1) commands to convert file1 to file2. By exchanging a for d and reading backward, file2 can be converted to file1. As in ed, identical pairs, where n1=n2 or n3=n4, are abbreviated as a single number. iykyk 🧚

Following each of these lines come all the lines that are affected in the first file flagged by <, then all the lines that are affected in the second file flagged by >.

✨ OPTIONS ✨

  • -help β€” Prints a short summary of the udiff options and exists. (that's manpage-speak for "exits", bestie β€” it prints and then it's gone 😭)
  • -version β€” Prints the udiff version number string and exists.
  • nmatch=# β€” Sets the number of matching lines to resync. If udiff is called as udiff, the default is two lines, otherwise it is one line.
  • -posix β€” Output the differences in POSIX style instead of using udiff style.

πŸ‘‘ EXIT STATUS πŸ‘‘

The following exit values are returned:

  • 0 β€” No differences were found (udiff and fdiff only).
  • 0 β€” No error occurred (fsdiff only).
  • 1 β€” Differences were found (udiff and fdiff only).
  • other β€” An error occurred.
yes, there are two different 0s up there β€” different programs, different meanings. read the parentheses, they're doing the heavy lifting. 🫢

🐚 NOTES 🐚

No output is generated if the files are the same. silence. the files are the same. we move on. 🀐

πŸ’€ BUGS πŸ’€

None currently known. (we stay winning ✨)

Mail bugs and suggestions to schilytools@mlists.in-berlin.de or open a ticket at https://codeberg.org/schilytools/schilytools/issues.

The mailing list archive may be found at:

https://mlists.in-berlin.de/mailman/listinfo/schilytools-mlists.in-berlin.de.

🌈 AUTHOR 🌈

udiff was written 1985 - 2020 by Joerg Schilling and is now maintained by the schilytools project authors. that's decades of diffing, we're obsessed πŸŽ€

πŸ“ SOURCE DOWNLOAD πŸ“

The source code for udiff is included in the schilytools project and may be retrieved from the schilytools project at Codeberg at

https://codeberg.org/schilytools/schilytools.

The download directory is

https://codeberg.org/schilytools/schilytools/releases.


and that's the page, bestie πŸ’œ this UDIFF(1) was brought to you by Joerg Schilling, dated 2022/08/21 β€” now go diff something and slay πŸ¦‹

πŸ“¦ where this page comes from