coreutils
[Top][All Lists]
Advanced

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

Re: [coreutils] Making md5sum aware of MSDOS line ending feasible?


From: Eric Blake
Subject: Re: [coreutils] Making md5sum aware of MSDOS line ending feasible?
Date: Wed, 15 Dec 2010 10:14:55 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 12/15/2010 10:05 AM, Philipp Thomas wrote:
> I've been asked if it was possible to make md5sum aware of MSDOS line
> endings so that files created with md5sum on DOS/WINDOWS could be read in
> without manual conversion.  Before evaluating how to possibly do that I
> wanted to ask if such a patch would be accepted as I would like to avoid a
> SUSE specific patch.

This issue has come up in the past.  To make it work, we'd need an
escape sequence \r (we already have escape sequences for \n and \\) to
uniquely identify whether a trailing carriage return is part of the
filename or part of the line ending, as well as a way to tell whether
md5sum is parsing a file generated by the new version that knows how to
generate \r escapes or the old version that blindly output literal \r.
The biggest reason that it hasn't been implemented yet is that no one
has been bothered enough by the current state of things to write the
patch (using d2u on the checksum file before handing it to md5sum is
usually a decent workaround to having to teach md5sum about alternate
line endings).

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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