coreutils
[Top][All Lists]
Advanced

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

Re: cksum: mode flag change when using --tag --untagged


From: Pádraig Brady
Subject: Re: cksum: mode flag change when using --tag --untagged
Date: Wed, 6 Mar 2024 21:59:50 +0000
User-agent: Mozilla Thunderbird

On 06/03/2024 15:32, Daniel Hofstetter wrote:
Hi,

I noticed some unexpected behavior and I'm unsure whether it's a bug
or a feature.

When using --untagged with non legacy checksums, the mode flag in the
output is ' ' (space), meaning text mode:

$ printf "hello" | cksum --untagged --algo=md5
5d41402abc4b2a76b9719d911017c592  -

However, if I add --tag, the mode flag changes to '*', meaning binary mode:

$ printf "hello" | cksum --tag --untagged --algo=md5
5d41402abc4b2a76b9719d911017c592 *-

According to 
https://www.gnu.org/software/coreutils/manual/html_node/cksum-common-options.html#index-_002d_002dtag,
--tag implies binary mode. On the other hand, --untagged overrides
--tag and so I expected text mode in the output.

So, is this behavior a bug or a feature?

I'm using coreutils 9.4 on Linux.

That's an edge case, but still a bug.
Should be fixed with the attached.

thanks,
Pádraig

Attachment: cksum--tag--untagged.patch
Description: Text Data


reply via email to

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