Skip to content

Commit

Permalink
cksum(1): Add EXAMPLES to manual page
Browse files Browse the repository at this point in the history
Approved by:	bcr@
  • Loading branch information
fernape committed Jan 18, 2024
1 parent 476d63e commit 70445a8
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion usr.bin/cksum/cksum.1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd April 28, 1995
.Dd January 18, 2024
.Dt CKSUM 1
.Os
.Sh NAME
Expand Down Expand Up @@ -149,6 +149,20 @@ The bit sequence is complemented and the result is the CRC.
.Ed
.Sh EXIT STATUS
.Ex -std cksum sum
.Sh EXAMPLES
Compute the checksum for all available algorithms.
Notice the difference in the size representation (in bytes for algorithm 1 and 2
and in blocks for 3 and the default algorithm):
.Bd -literal -offset indent
$ echo "hello" | cksum
3015617425 6
$ echo "hello" | cksum -o 1
36979 1
$ echo "hello" | cksum -o 2
542 1
$ echo "hello" | cksum -o 3
909783072 6
.Ed
.Sh SEE ALSO
.Xr md5 1
.Pp
Expand Down

0 comments on commit 70445a8

Please sign in to comment.