From c9f4c323220f51a42e3da8ea79f9ddcedab041b9 Mon Sep 17 00:00:00 2001 From: Ondrej Oprala Date: Thu, 2 Aug 2012 13:31:50 +0200 Subject: md5sum, sha*sum: add --tag to output a format indicating the algorithm The format used is the BSD traditional format which looks like: MD5 (/dev/null) = d41d8cd98f00b204e9800998ecf8427e * NEWS: Add new feature info. * doc/coreutils.texi (md5sum invocation): Add detailed information about the new --tag option. * src/md5sum.c: Add the new --tag option for BSD-style output. (bsd_split_3): Add ESCAPED_FILENAME parameter. (print_filename): New function refactored from main(). (filename_unescape): New function refactored from split_3(). * tests/misc/md5sum-bsd: Add tests for the new feature. --- doc/coreutils.texi | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 62b31fe1a..e015fc57f 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -3705,6 +3705,17 @@ If all listed files are readable and are consistent with the associated MD5 checksums, exit successfully. Otherwise exit with a status code indicating there was a failure. +@item --tag +@opindex --tag +@cindex BSD output +Output BSD style checksums, which indicate the checksum algorithm used. +As a @acronym{GNU} extension, file names with problematic characters +are escaped as described above, with the same escaping indicator of @samp{\} +at the start of the line, being used. +The @option{--tag} option implies binary mode, and is disallowed with +@option{--text} mode as supporting that would unnecessarily complicate +the output format, while providing little benefit. + @item -t @itemx --text @opindex -t @@ -3715,7 +3726,7 @@ outputting a @samp{ } flag. This is the inverse of @option{--binary}. This option is the default on systems like @acronym{GNU} that do not distinguish between binary and text files. On other systems, it is the default for reading standard input when standard input is a -terminal. +terminal. This mode is never defaulted to if @option{--tag} is used. @item -w @itemx --warn -- cgit v1.2.3-70-g09d2