bug-coreutils
[Top][All Lists]
Advanced

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

bug#7313: sha1sum etc, output in base64


From: Pádraig Brady
Subject: bug#7313: sha1sum etc, output in base64
Date: Tue, 02 Nov 2010 16:20:05 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 02/11/10 13:16, Caleb Cushing wrote:
> I'd like to be able to do something like this
> 
> sha1sum --base64
> 
> and instead of getting a hex representation get a base64 representation.
> 
> An alternative might be
> 
> sha1sum --raw | base64
> 
> obviously this applies to md5sum, sha512sum, etc

This is one of those border line cases.
I'm 40:60 against adding it as it seems easy enough
to acheive using existing tools:

env printf $(sha1sum file | sed 's/ .*//; s/\(..\)/\\x\1/g') | base64

Note using env above is to bypass the inbuilt printf
which doesn't support \x on dash for example.

cheers,
Pádraig.





reply via email to

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