[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: md5 without MD5 ("OpenBSD") =
- To: <misc@openbsd.org>
- Subject: Re: md5 without MD5 ("OpenBSD") =
- From: Andreas Gunnarsson <andreas@crt.se>
- Date: Mon, 3 Sep 2001 09:43:58 +0200 (MET DST)
On Sun, 2 Sep 2001, Camille Davis wrote:
> $ md5 -s "OpenBSD"
> MD5 ("OpenBSD") = 760be6e1c2192a5bf7c0df47cc5f71ca
>
> I just want
> 760be6e1c2192a5bf7c0df47cc5f71ca
You've got several replies but I wanted to point out that you may run into
trouble with some file names. I suggest the following:
md5 -s filename | tail -1 | awk '{print $NF}'
tail -1 only gives you the last line - in case the file name contains \n.
awk '{print $NF}' gives you the last word on that line - if the file name
contains spaces it may not be word number 4.
Andreas
--