As far as I can tell,
sed 's/\r$//' checksums.md5 | sed 's/\r/\n'/ | md5sum -c
works exactly as expected. If I knew where to find the source for this, I'm so
annoyed I might try to decipher it. I'm not very good, but it seems like it
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to coreutils in Ubuntu.
md5sum can't read md5 files with CRLF line terminators
Status in coreutils:
Status in coreutils package in Ubuntu:
Binary package hint: coreutils
I know this is going to be weird, but...
I'd very much like it if tools like md5sum handled files with CRLF
terminators better. I just tried checking a set of files using an .md5
summary generated on windows, and it doesn't work.
(1) This is really annoying. It took me five minutes to figure out
that it was the line terminators that were the problem. This was
compounded by the fact that neither "cat", "vi" nor "gedit" show any
sign of the distinction by default.
(2) This kind of issue is never going away, and it'll only grow with
more people using both systems. Already most tools, including almost
every text editor, do this by default.
(3) It's more than annoying: I intended to write a script that (among
many other things) checks such files often. If I need to check the
line terminators myself, it's going to take several times more effort.
(Well, at least double the amount.) And this will have to be done for
all such scripts.
(4) In the case of md5sum, there really is no excuse not to accept the
other kind of terminators. The syntax of the .md5 files is _very_ easy
to parse, CRLF terminators never change in any way the semantic, and
reading the .md5 files is a negligible effort compared with actually
checking the hashes, so there's no "inefficiency" problem. There's no
chance of backwards incompatibility, as long as output always uses the
same terminators it used to.
(5) The current errors shown for such files are nonsensical. (More
precisely, they don't indicate the problem unless you're already
familiar with it.)
This feature request is written for md5sum because that's where I had a
problem, but I'm sure this applies for many other core utils.
To manage notifications about this bug go to:
Mailing list: https://launchpad.net/~touch-packages
Post to : firstname.lastname@example.org
Unsubscribe : https://launchpad.net/~touch-packages
More help : https://help.launchpad.net/ListHelp