bug-coreutils
[Top][All Lists]
Advanced

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

Re: md5sum returns unrecognized option when using arg --string=


From: Johno Crawford
Subject: Re: md5sum returns unrecognized option when using arg --string=
Date: Thu, 04 May 2006 23:47:58 +1000
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)

Ah you're a champion Eric, thanks again!


Eric Blake wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Please keep replies on the list, so that others may see the solution to
this problem.

According to Johno Crawford on 5/3/2006 10:12 PM:
Thanks for the quick reply Eric,

obsolete to what? I used it frequently :) how would I go about
requesting that this option is restored? I wouldn't mind writing up some
documentation on the --string option if this would speed up the appeal.

Obsoleted to only using files.  This choice was made because with strings,
it is impossible to optimize the calculation because we can't easily
guarantee memory alignment, and it is not worth penalizing the common case
of checksumming files for the rare case of checksumming strings.  One way
to easily pass md5sum a temporary file descriptor (aka a pipe) whose
contents are the string in question would be:

$ echo hello world | md5sum -
645902ac237024bdd0c176cb93063dc4  -

This no longer lists the string in the md5sum output, but that can be
accomplished with a post-processing pass if you really want it:

$ string="hello world"
$ echo "$string" | md5sum - | sed -e "s,-,\"$string\","
6f5902ac237024bdd0c176cb93063dc4  "hello world"

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEWfLm84KuGfSFAYARAnLVAJ9yylCLBiHfuLGBOLbUpztmsxyTGQCdECjM
7M+UD+89poCK/7abwkcE22k=
=gF8X
-----END PGP SIGNATURE-----


--
Johno Crawford




reply via email to

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