On 17/12/2024 09:20, wrotycz wrote:
For some time I had in mind option to hash-sum that would only print checksum without filename as it is very useful when using calculated hashes. As there is no simple way to get rid of it, other than with external command like awk, I decided to add something simple to hash-sum command/s. I was intending to name it `-1' but found out that BSD already have[1] exactly that option and use `quiet' (`-q' for short) switch. So I followed suit and utilised already existing `--quiet' option. Attached short diff/patch for that occasion. How you find it useful and worth implementing. Regards -- 1. man.openbsd.org https://man.openbsd.org/md5
Piotr Dabrowski asked this recently, and my response then was: "Using the --quiet option for this seems a little awkward. One reason we added the --raw option, was for this single input case. I.e. please consider using something like this example:" cksum --raw -a md5 | basenc --base16 Now the BSDs implementing -q for this does change things a bit, as we'd be adding compat, albeit without adding functionality. So given there are two separate suggestions for this and we're increasing compat, I'm 55:45 for adding this now. Note FreeBSD at least will output checksums without file name for all specified files, though that would be an unusual use case. cheers, Pádraig