coreutils
[Top][All Lists]
Advanced

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

Re: add --color option to md5sum and shaXsum


From: Florent Monnier
Subject: Re: add --color option to md5sum and shaXsum
Date: Wed, 25 Dec 2013 14:00:14 +0100

2013/12/24, Pádraig Brady wrote:
> On 12/24/2013 12:25 PM, Florent Monnier wrote:
>> Hello,
>>
>> This patch adds a --color option to the commands md5sum and shaXsum.
>> The goal is to make it easier to visually identify similarities in a
>> list of printed checksums.
>>
>> It takes action only if stdout is a tty.
>>
>> This patch can be applied on the version 8.22 of the coreutils.
>>
>
> Sorry you've lost me. Why would you want this?

I use it since several months.
It has helped me to read and compare more easily / more quickly checksums.

I would think that some other people using the *sum utils could try
this --color feature a little, and after a while may say if they found
it of some help or not.


> If you wanted to compare hashes wouldn't it be better
> to pipe to uniq with something like: md5sum * | uniq --group -w32

I just discovered from you this new feature --group from the uniq tool
that appeared in the last 8.22 version.
This is a very nice option and surely useful.

Now I still prefer to see colors in front of me.
But I should try your solution, to compare, and I may change my mind
after a while.


> Also this doesn't strictly need to be within the *sum utils,
> so if not of general use, it might be best done as a separate util
> (which could also sort similarly perhaps)?

Sorry I don't understand what you mean.
Do you mean that it should be an overlay tool, similar to colordiff?
( http://www.colordiff.org/ )

If this is what you mean, indeed I've also think at such a solution,
but I just didn't do it because I found it easier to patch md5sum
rather than writting a perl (or equivalent language) script.

The colordiff wrapper is written with Perl (5 if I'm not mistaken).
I'm not that confident with Perl, this is not my main scripting
language of choice. But it might be the appropriate language for
writting a similar "colorchecksum" tool. I understand from your
example that such a tool would provide more possibilities by combining
it in multiple situations.

In your opinions, which programming/scripting language could be
appropriate, beside perl, for writting such a tool?

> thanks,
> Pádraig.

Thank you for taking some of your time to answer me.
Florent



reply via email to

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