diff options
author | steve <steve@FreeBSD.org> | 1997-12-29 03:40:37 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1997-12-29 03:40:37 +0000 |
commit | 2d5f5de4923edbf7c053b58c85cda5963fc0ca6e (patch) | |
tree | e2f4465627f2854bee17f62da5b617b3763680af /sbin/md5/md5.1 | |
parent | e40600458fdf7a84940f1de3103886173646b19b (diff) | |
download | FreeBSD-src-2d5f5de4923edbf7c053b58c85cda5963fc0ca6e.zip FreeBSD-src-2d5f5de4923edbf7c053b58c85cda5963fc0ca6e.tar.gz |
Get md5(1) to use getopt(3). Also some minor -Wall cleaning
while here.
PR: 5387
Submitted by: Matthew Hunt <mph@pobox.com>
Diffstat (limited to 'sbin/md5/md5.1')
-rw-r--r-- | sbin/md5/md5.1 | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/sbin/md5/md5.1 b/sbin/md5/md5.1 index cadc206..676e4a0 100644 --- a/sbin/md5/md5.1 +++ b/sbin/md5/md5.1 @@ -6,11 +6,9 @@ .Nd calculate a message-digest fingerprint (checksum) for a file .Sh SYNOPSIS .Nm -.Op Fl p -.Op Fl t -.Op Fl x -.Op Fl s Ns Ar string -.Op Ar filename Ns Pq s +.Op Fl ptx +.Op Fl s Ar string +.Op Ar file ... .Sh DESCRIPTION .Nm takes as input a message of arbitrary length and produces @@ -29,24 +27,20 @@ in a secure manner before being encrypted with a private key under a public-key cryptosystem such as .Em RSA . .Pp -The following four options may be used in any combination, except -that -.Ar filename Ns Pq s -must be the last objects on the command line. +The following four options may be used in any combination and must +precede any files named on the command line. The MD5 +sum of each file listed on the command line is printed after the options +are processed. .Bl -tag -width Fl -.It Fl s Ns Ar string +.It Fl s Ar string prints a checksum of the given -.Dq string . +.Ar string . .It Fl p echos stdin to stdout and appends the MD5 sum to stdout. .It Fl t runs a built-in time trial. .It Fl x runs a built-in test script. -.It Ar filename Ns Pq s -prints a checksum -.Pq s -for each of the files. .El .Sh SEE ALSO .Xr cksum 1 |