[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Enhancement Request for sha256sum - output only the SHA-256 hash alo
From: |
Bernhard Voelker |
Subject: |
Re: Enhancement Request for sha256sum - output only the SHA-256 hash alone |
Date: |
Fri, 24 Jul 2020 23:56:57 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 2020-07-19 12:00, Jeffrey Walton wrote:
> Related, b2sum (also provided by coreutils), offers the option. But
> you have to specify --tag to get just the hash. And I don't believe
> coreutils supports the option.
Not quite: coreutils' b2sum supports --tag (like the other *sum utilities),
but still outputs - also - the file name:
$ b2sum --help | grep tag
--tag create a BSD-style checksum
$ b2sum --tag /proc/cpuinfo
BLAKE2b (/proc/cpuinfo) =
7a8f21bd21de088af5cf29ac21eea21f2b7c21e893b300cf001d6c8a18ddf9d93ef4b46fb1befc4[...]
$ sha256sum --tag /proc/cpuinfo
SHA256 (/proc/cpuinfo) =
2f6134c08218d4ca1fe9c4d711762e8a0a8cd83631ceae26c698a7560367a04b
So --tag was introduced for compatibility with an existing implementation.
Have a nice day,
Berny