diff options
author | Steve Price <steve@FreeBSD.org> | 1997-12-29 03:40:37 +0000 |
---|---|---|
committer | Steve Price <steve@FreeBSD.org> | 1997-12-29 03:40:37 +0000 |
commit | 716847a66938ee1256b344179295e37a0fe97fc9 (patch) | |
tree | f0599245e346b6724b38d35d7f4aa4f8475a7233 /sbin/md5/md5.1 | |
parent | b497d313738ee08e75dad88a1d5342bfce0868b3 (diff) | |
download | src-716847a66938ee1256b344179295e37a0fe97fc9.tar.gz src-716847a66938ee1256b344179295e37a0fe97fc9.zip |
Get md5(1) to use getopt(3). Also some minor -Wall cleaning
while here.
PR: 5387
Submitted by: Matthew Hunt <mph@pobox.com>
Notes
Notes:
svn path=/head/; revision=32074
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 cadc2066af18..676e4a00c555 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 |