Re: MD5 listing format
On Sun 28 Nov 2021 at 20:21:15 (+0100), Thomas Schmitt wrote:
> David Wright wrote:
> > I was taken by surprise by the following output from md5sum:
> > \adfc1d2f1b1d6c7fcaa51e857c1a6f68 special/C:\\nppdf32Log\\debuglog.txt
>
> It's a feature, not a bug. (tm)
>
> https://www.gnu.org/software/coreutils/manual/html_node/md5sum-invocation.html
>
> "Without --zero, if file contains a backslash, newline, or carriage
> return, the line is started with a backslash, and each problematic
> character in the file name is escaped with a backslash, making the
> output unambiguous even in the presence of arbitrary file names."
Ah, I missed that. Ironic considering that I feed md5sum with -print0
and -0 options, but then, md5sum is my final "product". I guess it's
required for md5sum -c to work correctly.
Thanks to Greg too. My solution will be to rename or delete the file,
after adding code to detect any future occurrences.
Cheers,
David.
Reply to: