[Top][All Lists]

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

Re: RFE: hash-type in sum utils

From: Pádraig Brady
Subject: Re: RFE: hash-type in sum utils
Date: Thu, 26 Jul 2012 16:50:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 07/26/2012 03:06 PM, Ondrej Oprala wrote:
> Sorry but I cant seem to create a filename that would cause md5sum --tag  to
> output escaping different from the BSD's md5. Could you be more specific on 
> the BSD escaping problem, please?
> Also thanks for the formatting patch.

Oops, I assumed BSD's utils would at least escape '\n'
but looking at their code they just output it directly.

So therefore BSD and old GNU don't support checksum files
in BSD format when any file names contain a '\n'. Fair enough.

So then , I suppose we should use the existing GNU escape mechanism
in this case too. I.E. if there is a '\n' character in the name,
then add a '\' at the start of the line and replace any
'\' with "\\" and '\n' with "\" + "n".

BTW, I'm wondering why we enable escaping on output when
there are '\' characters in the name, but no '\n' chars?
Avoiding that would increase compatibility with the BSDs.


reply via email to

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