coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] md5sum,b2sum,sha*sum: support -s option


From: Carlos Santos
Subject: Re: [PATCH] md5sum,b2sum,sha*sum: support -s option
Date: Mon, 25 Jun 2018 14:33:14 -0300 (BRT)

> From: "Michael Stone" <address@hidden>
> To: "Coreutils" <address@hidden>
> Sent: Monday, June 25, 2018 11:25:48 AM
> Subject: Re: [PATCH] md5sum,b2sum,sha*sum: support -s option

> On Mon, Jun 25, 2018 at 12:23:29AM -0300, Carlos Santos wrote:
>>I stumbled on it when attempted to write a script that uses sha256sum
>>and needs to work both on Fedora 7 and on an embedded system built with
>>Buildroot. It's necessary to test where sha256sum comes from and use a
>>variable for the status argument:
>>
>>    if sha256sum --help 2>&1 | fgrep -q BusyBox; then
>>        s_arg="-s" # BusyBox
>>    else
>>        s_arg="--status" # coreutils
>>    fi
>>    echo "${checksum}  ${img_file}" | sha256sum -c "${s_arg}" -w
> 
> Can't you just skip both options and direct output to /dev/null?

Yes. From my perspective the problem is already solved. I just wanted
to give a small contribution to future generations.

-- 
Carlos Santos (Casantos) - DATACOM, P&D
“Marched towards the enemy, spear upright, armed with the certainty
that only the ignorant can have.” — Epitaph of a volunteer



reply via email to

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