On 24/06/18 20:23, Carlos Santos wrote: >> From: "Pádraig Brady" <[email protected]> >> To: "DATACOM" <[email protected]>, "Coreutils" <[email protected]> >> Sent: Monday, June 25, 2018 12:09:28 AM >> Subject: Re: [PATCH] md5sum,b2sum,sha*sum: support -s option > >> On 24/06/18 20:00, Carlos Santos wrote: >>> Add an alias to --status matching the "-s" option recognized by BusyBox. >>> It helps to interchange scripts between full-fledged Linux distributions >>> and embedded systems on which BusyBox is used instead of coreutils. >> >> It looks like busybox doesn't support any long options? > > Right. > >> Why is this one in particular important? > > 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 >
-s was removed a long time ago https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=FILEUTILS-3_12a-7-g7823351 One disadvantage of adding it back is that scripts written say on Fedora 29 could then fail if ported elsewhere. Now we did recently add -w, so adding -s would make busybox a strict subset of coreutils, which would be desirable.
