| Summary: | diff manpage lacks a return value section | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Documentation | Reporter: | Erik Greenwald <erik> | ||||
| Component: | Books & Articles | Assignee: | Ceri Davies <ceri> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | CC: | erik | ||||
| Priority: | Normal | ||||||
| Version: | Latest | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Erik Greenwald
2003-12-06 16:00:36 UTC
On 2003-12-06 15:57, Erik Greenwald <erik@smluc.org> wrote: > No text indicates what return values to expect from diff... > [...] > --- diff.1.patch begins here --- > --- gnu/usr.bin/diff/diff.1.orig Sat Dec 6 10:48:42 2003 > +++ gnu/usr.bin/diff/diff.1 Sat Dec 6 10:54:16 2003 > @@ -474,6 +474,10 @@ > .TP > .B \-y > Use the side by side output format. > +.SH RETURN VALUE > +.I diff > +returns a 0 if the files are identical or a 1 if the files differ. If one or > +both of the files cannot be opened, then the return value is set to 2. > .SH ENVIRONMENT > The environment variable > .B DIFF_OPTIONS Nice catch! Note, though, that it is a good practice to start a new line with every new sentence, when writing manpages. I'd probably write the same diff without the 'a' article before numbers too: %%% --- gnu/usr.bin/diff/diff.1.orig Sat Dec 6 10:48:42 2003 +++ gnu/usr.bin/diff/diff.1 Sat Dec 6 10:54:16 2003 @@ -474,6 +474,11 @@ .TP .B \-y Use the side by side output format. +.SH RETURN VALUE +.I diff +returns 0 if the files are identical or 1 if the files differ. +If one or both of the files cannot be opened, +then the return value is set to 2. .SH ENVIRONMENT The environment variable .B DIFF_OPTIONS %%% Responsible Changed From-To: freebsd-doc->ceri I'll take this. State Changed From-To: open->patched Patched in -HEAD. ehhh, this should probably be backed out. The info is in the
'diagnostics' section, I must've missed that. My bad, sorry
--
-Erik <erik@smluc.org> [http://math.smsu.edu/~erik]
The opinions expressed by me are not necessarily opinions. In all probability,
they are random rambling, and to be ignored. Failure to ignore may result in
severe boredom or confusion. Shake well before opening. Keep Refrigerated.
State Changed From-To: patched->closed This turned out to be unnecessary - keramida backed out the changes I had made (thanks). Thanks to the submitter for the report, anyhow. |