emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#9956: closed (Linux program "sum")


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#9956: closed (Linux program "sum")
Date: Fri, 04 Nov 2011 20:00:05 +0000

Your message dated Fri, 04 Nov 2011 13:56:59 -0600
with message-id <address@hidden>
and subject line Re: bug#9956: Linux program "sum"
has caused the debbugs.gnu.org bug report #9956,
regarding Linux program "sum"
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
9956: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9956
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Linux program "sum" Date: Fri, 4 Nov 2011 13:37:34 -0500
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
 

--- End Message ---
--- Begin Message --- Subject: Re: bug#9956: Linux program "sum" Date: Fri, 04 Nov 2011 13:56:59 -0600 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
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   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]