Date: Thu, 1 Jan 2004 03:10:27 -0800 (PST) From: Giorgos Keramidas <keramida@freebsd.org> To: freebsd-doc@FreeBSD.org Subject: Re: docs/59991: diff manpage lacks a return value section Message-ID: <200401011110.i01BARfu081825@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/59991; it has been noted by GNATS. From: Giorgos Keramidas <keramida@freebsd.org> To: Erik Greenwald <erik@smluc.org> Cc: bug-followup@freebsd.org Subject: Re: docs/59991: diff manpage lacks a return value section Date: Thu, 1 Jan 2004 13:20:36 +0200 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 %%%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401011110.i01BARfu081825>