coreutils
coreutils copied to clipboard
cksum: `-b` shouldn't be a shortcut of `--base64`
Currently, we use -b as a shortcut for --base64. However, this is incorrect, the behavior of -b was changed in GNU 9.4 according to https://github.com/coreutils/coreutils/blob/master/NEWS:
'cksum -b' no longer prints base64-encoded checksums. Rather that
short option is reserved to better support emulation of the standalone
checksum utilities with cksum.
For most algorithms, -b is a shortcut for --binary.
Thanks to @Rudxain for pointing out this issue in https://github.com/uutils/coreutils/pull/6187#issuecomment-2080306876
it will be fixed by https://github.com/uutils/coreutils/pull/6256/files#diff-72cab80d2a2bb2f434c03de3fe87a5b9b953f489255f85f9576158ba60d309a1L454
Honestly, I didn't even expect to be right, haha. According to toybox md5sum --help: "Brief (hash only, no filename)". I was confused because I'm used to the Toybox implementation (because of Android), then I went to the Termux distribution of GNU coreutils and it said -b is "binary". I expected Toybox to have less features, not entirely different APIs! I was proven wrong
Fixed by https://github.com/uutils/coreutils/pull/6256