From unknown Fri Jun 20 07:28:47 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#9956 <9956@debbugs.gnu.org> To: bug#9956 <9956@debbugs.gnu.org> Subject: Status: Linux program "sum" Reply-To: bug#9956 <9956@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:28:47 +0000 retitle 9956 Linux program "sum" reassign 9956 coreutils submitter 9956 Rodney Rieck severity 9956 normal tag 9956 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 04 15:14:28 2011 Received: (at submit) by debbugs.gnu.org; 4 Nov 2011 19:14:29 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMPDg-0002T8-Eq for submit@debbugs.gnu.org; Fri, 04 Nov 2011 15:14:28 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMOgV-0001hO-Ib for submit@debbugs.gnu.org; Fri, 04 Nov 2011 14:40:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMOdz-0005oF-1V for submit@debbugs.gnu.org; Fri, 04 Nov 2011 14:37:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,HTML_MESSAGE, MIME_HTML_ONLY, MIME_QP_LONG_LINE, RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:49198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMOdy-0005oB-WD for submit@debbugs.gnu.org; Fri, 04 Nov 2011 14:37:35 -0400 Received: from eggs.gnu.org ([140.186.70.92]:38747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMOdy-00068w-11 for bug-coreutils@gnu.org; Fri, 04 Nov 2011 14:37:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMOdw-0005na-K0 for bug-coreutils@gnu.org; Fri, 04 Nov 2011 14:37:33 -0400 Received: from txlegofep02.suddenlink.net ([208.180.40.76]:37752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMOdw-0005n3-Be for bug-coreutils@gnu.org; Fri, 04 Nov 2011 14:37:32 -0400 Received: from Rodney-PC ([74.197.96.37]) by txlegofep02.suddenlink.net (InterMail vM.7.09.01.03 201-2219-108-104-20100907) with ESMTP id <20111104183727.GHOU10450.txlegofep02.suddenlink.net@Rodney-PC> for ; Fri, 4 Nov 2011 13:37:27 -0500 From: Rodney Rieck To: X-Mailer: PocoMail 4.5 (3910) - Licensed Version Date: Fri, 4 Nov 2011 13:37:34 -0500 Message-ID: <2011114133734.293567@Rodney-PC> Subject: Linux program "sum" Mime-Version: 1.0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Cloudmark-Analysis: v=1.1 cv=uxX56mnN+voKlHxX/X6kjJOqM/qJlpexURUqNBMblCY= c=1 sm=0 a=xzW3HwPJiLYA:10 a=xeB8rjCUnTYA:10 a=8nJEP1OIZ-IA:10 a=dxAoac8UkJuggrlux3cA:9 a=N-gKfiL0fg0jCDRgey0A:7 a=wPNLvfGTeEIA:10 a=lae_hwuDk4iYdE0H:21 a=G48NjCX59dXNCPZC:21 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-detected-operating-system: by eggs.gnu.org: Solaris 10 (1203?) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 04 Nov 2011 15:14:26 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.7 (---)
Hello,
 
This is about the= Linux program "sum" that computes checksums and number of blocks in a file.=  I'm not writing about a program error I've found -- I am writing= about how the output from the program is formatted.
 
If you type in= something like this:  sum -r *
 
and if there are= multiple files present in the current directory, you will get output like= this for each file it checks:
 
[check_sum]= [number_of_blocks] [file_name]
 
If though on the= command line you change the "*" to a single file name, the output is the= same except that it doesn't print/display the "[file_name]", I guess= because that seems redundant because the file name is already known and was= typed in on the command line.
 
There are cases= though where it would be helpful to have that file name on the output line.=  Quite often I write scripts, edited from an "ls" command, to do= checksums on individual/uniq file names, and then redirect checksum output= to another file.  Actually I have 2 copies of these files, and I'm= comparing the checksum of the 2 different versions to see if the files are= the same.  So, I redirect the checksum output of both instances to a= file, and then compare or do "diff" on those 2 checksum output files.=  And that of course tells me if there are any differences in the 2= sets of files.
 
The only problem= is that the file name is truncated on the lines where there are= differences, so it is then hard to go back and get the actual file names of= the differences.
 
The file name= gets truncated on the display also even if there is a wildcard in the file= spec keyed on the command line, but "sum" finds only 1 file as a= match.
 
Just to let you= know, on SCO Unix (and I suppose other flavors of Unix), the output of a= "sum -r [file_name]" with a singular file does print that file= name.
 
Thanks for your= consideration,
 
Rodney= Rieck
 
From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 04 15:59:41 2011 Received: (at control) by debbugs.gnu.org; 4 Nov 2011 19:59:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMPvQ-0003Us-OV for submit@debbugs.gnu.org; Fri, 04 Nov 2011 15:59:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMPvM-0003Ue-KK; Fri, 04 Nov 2011 15:59:38 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA4JuxqI005293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 4 Nov 2011 15:57:00 -0400 Received: from [10.3.113.152] (ovpn-113-152.phx2.redhat.com [10.3.113.152]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pA4JuxxV029256; Fri, 4 Nov 2011 15:56:59 -0400 Message-ID: <4EB4438B.3090308@redhat.com> Date: Fri, 04 Nov 2011 13:56:59 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110928 Fedora/3.1.15-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.4 Thunderbird/3.1.15 MIME-Version: 1.0 To: Rodney Rieck Subject: Re: bug#9956: Linux program "sum" References: <2011114133734.293567@Rodney-PC> In-Reply-To: <2011114133734.293567@Rodney-PC> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: control Cc: 9956-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.3 (----------) tag 9956 notabug thanks On 11/04/2011 12:37 PM, Rodney Rieck wrote: > If you type in something like this: sum -r * > > and if there are multiple files present in the current directory, you > will get output like this for each file it checks: > > [check_sum] [number_of_blocks] [file_name] > > If though on the command line you change the "*" to a single file name, > the output is the same except that it doesn't print/display the > "[file_name]", I guess because that seems redundant because the file > name is already known and was typed in on the command line. Thanks for the report. If you want 'sum' to output the file name, even for one file, then use 'sum --sysv' (or sum -s), although that alters the output to strip leading zeroes and use slightly different spacing: $ sum a 00000 0 a $ sum -s a 0 0 a Since this feature is already implemented, I'm closing out this bug report. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 06 03:40:53 2011 Received: (at 9956) by debbugs.gnu.org; 6 Nov 2011 08:40:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMyHc-00023F-Ss for submit@debbugs.gnu.org; Sun, 06 Nov 2011 03:40:53 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMyHa-000235-PH for 9956@debbugs.gnu.org; Sun, 06 Nov 2011 03:40:52 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 2608160039; Sun, 6 Nov 2011 09:38:05 +0100 (CET) From: Jim Meyering To: 9956@debbugs.gnu.org Subject: Re: bug#9956: Linux program "sum" In-Reply-To: <4EB4438B.3090308@redhat.com> (Eric Blake's message of "Fri, 04 Nov 2011 13:56:59 -0600") References: <2011114133734.293567@Rodney-PC> <4EB4438B.3090308@redhat.com> Date: Sun, 06 Nov 2011 09:38:05 +0100 Message-ID: <87y5vtsl1u.fsf@rho.meyering.net> Lines: 37 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 9956 Cc: eblake@redhat.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Eric Blake wrote: > On 11/04/2011 12:37 PM, Rodney Rieck wrote: >> If you type in something like this: sum -r * >> >> and if there are multiple files present in the current directory, you >> will get output like this for each file it checks: >> >> [check_sum] [number_of_blocks] [file_name] >> >> If though on the command line you change the "*" to a single file name, >> the output is the same except that it doesn't print/display the >> "[file_name]", I guess because that seems redundant because the file >> name is already known and was typed in on the command line. > > Thanks for the report. If you want 'sum' to output the file name, > even for one file, then use 'sum --sysv' (or sum -s), although that > alters the output to strip leading zeroes and use slightly different > spacing: > > $ sum a > 00000 0 a > $ sum -s a > 0 0 a > > Since this feature is already implemented, I'm closing out this bug report. Note that if you really do want sum's default checksum algorithm, then you do not want to add the --sysv option, since that usually results in a different checksum: $ echo foo > k $ sum k; sum -s k 00106 1 334 1 k Depending on your application, if you're not particularly attached to sum's checksum algorithm, then you may want to use sha1sum instead. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 06 08:03:45 2011 Received: (at 9956) by debbugs.gnu.org; 6 Nov 2011 13:03:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RN2Nz-0002DZ-Hh for submit@debbugs.gnu.org; Sun, 06 Nov 2011 08:03:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RN2Nw-0002DQ-Hx for 9956@debbugs.gnu.org; Sun, 06 Nov 2011 08:03:41 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA6D0sVQ031524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 6 Nov 2011 08:00:54 -0500 Received: from [10.36.116.22] (ovpn-116-22.ams2.redhat.com [10.36.116.22]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pA6D0pBV027115 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 6 Nov 2011 08:00:53 -0500 Message-ID: <4EB68502.9070609@draigBrady.com> Date: Sun, 06 Nov 2011 13:00:50 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Rodney Rieck Subject: Re: bug#9956: Linux program "sum" References: <2011114133734.293567@Rodney-PC> In-Reply-To: <2011114133734.293567@Rodney-PC> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id pA6D0sVQ031524 X-Spam-Score: -10.4 (----------) X-Debbugs-Envelope-To: 9956 Cc: 9956@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.4 (----------) On 11/04/2011 06:37 PM, Rodney Rieck wrote: > Hello, >=20 >=20 >=20 > This is about the Linux program "sum" that computes checksums and > number of blocks in a file. I'm not writing about a program error I= 've > found -- I am writing about how the output from the program is > formatted. >=20 > If you type in something like this: sum -r * >=20 > and if there are multiple files present in the current directory, yo= u > will get output like this for each file it checks: >=20 > [check_sum] [number_of_blocks] [file_name] >=20 > If though on the command line you change the "*" to a single file na= me, > the output is the same except that it doesn't print/display the > "[file_name]", I guess because that seems redundant because the file > name is already known and was typed in on the command line. I consider that a bug. freebsd always outputs the file name for example. This means that if you do `find -type f | xargs sum`, the last entry could be without a file name. Now we can't change without consideration for backwards compat, though I'd be inclined to fix this inconsistency. cheers, P=E1draig. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 06 08:15:46 2011 Received: (at 9956) by debbugs.gnu.org; 6 Nov 2011 13:15:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RN2Zd-0003HS-Us for submit@debbugs.gnu.org; Sun, 06 Nov 2011 08:15:46 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RN2Zb-0003HL-KO for 9956@debbugs.gnu.org; Sun, 06 Nov 2011 08:15:44 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id DF931600D7; Sun, 6 Nov 2011 14:12:56 +0100 (CET) From: Jim Meyering To: =?iso-8859-1?Q?P=E1draig?= Brady Subject: Re: bug#9956: Linux program "sum" In-Reply-To: <4EB68502.9070609@draigBrady.com> (=?iso-8859-1?Q?=22P=E1drai?= =?iso-8859-1?Q?g?= Brady"'s message of "Sun, 06 Nov 2011 13:00:50 +0000") References: <2011114133734.293567@Rodney-PC> <4EB68502.9070609@draigBrady.com> Date: Sun, 06 Nov 2011 14:12:56 +0100 Message-ID: <874nyhs8br.fsf@rho.meyering.net> Lines: 40 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 9956 Cc: 9956@debbugs.gnu.org, Rodney Rieck X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) P=E1draig Brady wrote: > On 11/04/2011 06:37 PM, Rodney Rieck wrote: >> Hello, >> >> This is about the Linux program "sum" that computes checksums and >> number of blocks in a file. I'm not writing about a program error I'= ve >> found -- I am writing about how the output from the program is >> formatted. >> >> If you type in something like this: sum -r * >> >> and if there are multiple files present in the current directory, you >> will get output like this for each file it checks: >> >> [check_sum] [number_of_blocks] [file_name] >> >> If though on the command line you change the "*" to a single file nam= e, >> the output is the same except that it doesn't print/display the >> "[file_name]", I guess because that seems redundant because the file >> name is already known and was typed in on the command line. > > I consider that a bug. > freebsd always outputs the file name for example. > This means that if you do `find -type f | xargs sum`, > the last entry could be without a file name. > > Now we can't change without consideration for backwards compat, > though I'd be inclined to fix this inconsistency. The existing behavior is compatible with that of UCB sum, and -r (the default) selects BSD compatibility: solaris10$ : > k && /usr/ucb/sum k 00000 0 solaris10$ /usr/ucb/sum k k 00000 0 k 00000 0 k Since GNU sum's raison d'etre is compatibility, I'd have a hard time justifying a change that would render it incompatible. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 06 19:25:50 2011 Received: (at 9956) by debbugs.gnu.org; 7 Nov 2011 00:25:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RND26-0003eX-A8 for submit@debbugs.gnu.org; Sun, 06 Nov 2011 19:25:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RND23-0003eP-A4 for 9956@debbugs.gnu.org; Sun, 06 Nov 2011 19:25:48 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA70MvkB006703 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 6 Nov 2011 19:22:57 -0500 Received: from [10.36.116.19] (ovpn-116-19.ams2.redhat.com [10.36.116.19]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pA70Ms2u022274 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 6 Nov 2011 19:22:56 -0500 Message-ID: <4EB724DE.9000605@draigBrady.com> Date: Mon, 07 Nov 2011 00:22:54 +0000 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: Jim Meyering Subject: Re: bug#9956: Linux program "sum" References: <2011114133734.293567@Rodney-PC> <4EB68502.9070609@draigBrady.com> <874nyhs8br.fsf@rho.meyering.net> In-Reply-To: <874nyhs8br.fsf@rho.meyering.net> X-Enigmail-Version: 1.3.2 Content-Type: text/plain; charset=ISO-8859-1 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id pA70MvkB006703 X-Spam-Score: -10.4 (----------) X-Debbugs-Envelope-To: 9956 Cc: 9956@debbugs.gnu.org, Rodney Rieck X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.5 (----------) On 11/06/2011 01:12 PM, Jim Meyering wrote: > P=E1draig Brady wrote: >> On 11/04/2011 06:37 PM, Rodney Rieck wrote: >>> Hello, >>> >>> This is about the Linux program "sum" that computes checksums and >>> number of blocks in a file. I'm not writing about a program error= I've >>> found -- I am writing about how the output from the program is >>> formatted. >>> >>> If you type in something like this: sum -r * >>> >>> and if there are multiple files present in the current directory, = you >>> will get output like this for each file it checks: >>> >>> [check_sum] [number_of_blocks] [file_name] >>> >>> If though on the command line you change the "*" to a single file = name, >>> the output is the same except that it doesn't print/display the >>> "[file_name]", I guess because that seems redundant because the fi= le >>> name is already known and was typed in on the command line. >> >> I consider that a bug. >> freebsd always outputs the file name for example. >> This means that if you do `find -type f | xargs sum`, >> the last entry could be without a file name. >> >> Now we can't change without consideration for backwards compat, >> though I'd be inclined to fix this inconsistency. >=20 > The existing behavior is compatible with that of UCB sum, > and -r (the default) selects BSD compatibility: >=20 > solaris10$ : > k && /usr/ucb/sum k > 00000 0 > solaris10$ /usr/ucb/sum k k > 00000 0 k > 00000 0 k >=20 > Since GNU sum's raison d'etre is compatibility, I'd have a hard > time justifying a change that would render it incompatible. >=20 Interesting. On solaris: $ echo 1 > 1 $ sum -r 1 32802 1 1 $ /usr/ucb/sum 1 32802 1 UCB being the "Berkley" variant. However BSD changed to always outputting the filename at some stage because `sum` does so on FreeBSD, and has since 1993 according to http://svnweb.freebsd.org/base/head/usr.bin/cksum/ This suggests that the UCB variant was added to solaris around 1989 http://src.illumos.org/source/xref/illumos-gate/usr/src/ucbcmd/sum/sum.= c So I'm guessing this was changed in the BSD source sometime between 1989 and 1993. cheers, P=E1draig. From unknown Fri Jun 20 07:28:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 05 Dec 2011 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator