read - read from standard input with optional seek
SYNOPSIS
read
[
-[eor]
offset
] [
count
]
DESCRIPTION
Read
does a single read of
count
bytes (default:
8192 bytes)
from the standard input and writes
the result to the standard output.
If the optional
offset
argument is given,
read
will first apply
sys-seek(2):
-o offset
seek
offset
bytes from the start of the file
-e offset
seek
offset
bytes from the end of the file
-r offset
seek
offset
bytes from the standard input's current file offset
In all cases the file offset changes to
reflect the result of the seek, and the number of bytes
read.
SOURCE
/appl/cmd/read.b
DIAGNOSTICS
Read
prints a diagnostic and returns a non-empty exit
status
fail:error
on an I/O error;
it quietly returns status
fail:eof
if the read returns zero bytes (conventionally, end of file).