|
NAMEudiff, fdiff, fsdiff - shows where two files differSYNOPSISudiff [ options ] file1 file2fdiff [ options ] file1 file2 fsdiff [ options ] file1 file2 DESCRIPTIONudiff shows what lines differ between two files. udiff supports arbitrary line lengths and treats binary files the same as text files.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). 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. Since the performance of udiff is only a linear function of the file size, using fsdiff speeds up SCCS with large files. Since the differences reported by fsdiff are smaller that what bdiff reports, this helps to keep SCCS history files smaller. 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. 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. 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
EXIT STATUSThe following exit values are returned:
NOTESNo output is generated if the files are the same.AUTHORudiff was written 1985 - 2020 by Joerg Schilling
Visit the GSP FreeBSD Man Page Interface. |