NetBSD-Users archive

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

Re: cksum new parameters -q and -r



On Tue, Aug 05, 2014 at 10:27:18AM +0200, Kamil Rytarowski wrote:
> Hello,
> ?
> I've been porting a piece of software for personal usage from Linux
> and FreeBSD to NetBSD.
> 
> I was looking for a GNU md5sum equivalent that works like `cksum -q`
> in FreeBSD [1] and OpenBSD [2] "-q Only print the checksum (quiet
> mode) or if used in conjunction with the -c flag, only print the
> failed cases."
> 
> From what I can see we miss it and we need to pipe a result of `md5`
> to a stream parser (sed, awk).  This adds more burden in scripting
> languages that doesn't support piping.

Just provide the file as stdin, e.g.

% md5 < Makefile
c484c4693b61f058087c0bb84091adfb
%

Regards,
Alistair


Home | Main Index | Thread Index | Old Index