Importing usr.bin/hexdump
Replaces commands/hexdump as well as commands/od. No Minix-specific changes were needed. test/testsh2.sh was modified to match the spacing used in the output of the NetBSD od command. Change-Id: I65ee1d30e8cdd546097462df7c38c2d38f3e891d
This commit is contained in:
@@ -11,7 +11,7 @@ MAN= ash.1 at.1 \
|
||||
last.1 loadfont.1 loadkeys.1 logger.1 \
|
||||
look.1 lp.1 lspci.1 mail.1 \
|
||||
mixer.1 \
|
||||
mkproto.1 mount.1 mt.1 od.1 \
|
||||
mkproto.1 mount.1 mt.1 \
|
||||
ping.1 playwave.1 prep.1 \
|
||||
profile.1 ps.1 rcp.1 recwave.1 \
|
||||
remsync.1 rget.1 rlogin.1 rsh.1 rz.1 \
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
.TH OD 1
|
||||
.SH NAME
|
||||
od \- octal dump
|
||||
.SH SYNOPSIS
|
||||
\fBod\fR [\fB\-bcdhox\fR]\fR [\fIfile\fR] [ [\fB+\fR] \fIoffset\fR [\fB.\fR][\fBb\fR]\fR ]\fR
|
||||
.br
|
||||
.de FL
|
||||
.TP
|
||||
\\fB\\$1\\fR
|
||||
\\$2
|
||||
..
|
||||
.de EX
|
||||
.TP 20
|
||||
\\fB\\$1\\fR
|
||||
# \\$2
|
||||
..
|
||||
.SH OPTIONS
|
||||
.TP 5
|
||||
.B \-b
|
||||
# Dump bytes in octal
|
||||
.TP 5
|
||||
.B \-c
|
||||
# Dump bytes as ASCII characters
|
||||
.TP 5
|
||||
.B \-d
|
||||
# Dump words in decimal
|
||||
.TP 5
|
||||
.B \-h
|
||||
# Print addresses in hex (default is octal)
|
||||
.TP 5
|
||||
.B \-o
|
||||
# Dump words in octal (default)
|
||||
.TP 5
|
||||
.B \-v
|
||||
# Verbose (list duplicate lines)
|
||||
.TP 5
|
||||
.B \-x
|
||||
# Dump words in hex
|
||||
.SH EXAMPLES
|
||||
.TP 20
|
||||
.B od \-ox file
|
||||
# Dump \fIfile\fP in octal and hex
|
||||
.TP 20
|
||||
.B od \-d file +1000
|
||||
# Dump \fIfile\fP starting at byte 01000
|
||||
.TP 20
|
||||
.B od \-c file +10.b
|
||||
# Dump \fIfile\fP starting at block 10
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
.I Od
|
||||
dumps a file in one or more formats.
|
||||
If \fIfile\fP is missing, \fIstdin\fR is dumped.
|
||||
The \fIoffset\fP argument tells
|
||||
.I od
|
||||
to skip a certain number of bytes or blocks before starting.
|
||||
The offset is in octal bytes, unless it is followed by a
|
||||
\&'.\&' for decimal or \fBb\fP for blocks or both.
|
||||
Reference in New Issue
Block a user