PEEK(1) MachTen Reference Manual PEEK(1)

NAME
peek - copies a byte sequence from a file

SYNOPSIS
peek [-h [bwl]] file [offset [length]]

DESCRIPTION
Peek advances offset bytes into file and copies the next length bytes to
standard output. If unspecified, offset defaults to zero, and length de-
faults to the number of bytes in file minus offset.

The -h option causes peek to write a hexadecimal representation of the
data to standard output. The data is formatted as a sequence of bytes,
words (shorts), or longs according to the suboption b, w, or l; b is the
default.

DIAGNOSTICS
Exit status is 0 if successful, 1 if an error was detected, or 2 if an
EOF was detected before length bytes could be read from file.

SEE ALSO
poke(1) od(1)

4.4BSD December 2, 1992 1