summaryrefslogtreecommitdiff
path: root/man/1/read
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
committerCharles.Forsyth <devnull@localhost>2006-12-22 20:52:35 +0000
commit46439007cf417cbd9ac8049bb4122c890097a0fa (patch)
tree6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /man/1/read
parent37da2899f40661e3e9631e497da8dc59b971cbd0 (diff)
20060303-partial
Diffstat (limited to 'man/1/read')
-rw-r--r--man/1/read62
1 files changed, 62 insertions, 0 deletions
diff --git a/man/1/read b/man/1/read
new file mode 100644
index 00000000..e9caab60
--- /dev/null
+++ b/man/1/read
@@ -0,0 +1,62 @@
+.TH READ 1
+.SH NAME
+read \- read from standard input with optional seek
+.SH SYNOPSIS
+.B read
+[
+.BR - [ eor ]
+.I offset
+] [
+.I count
+]
+.SH DESCRIPTION
+.I Read
+does a single read of
+.I count
+bytes (default:
+8192 bytes)
+from the standard input and writes
+the result to the standard output.
+If the optional
+.I offset
+argument is given,
+.I read
+will first apply
+.IR sys-seek (2):
+.TP
+.BI -o " offset"
+seek
+.I offset
+bytes from the start of the file
+.TP
+.BI -e " offset"
+seek
+.I offset
+bytes from the end of the file
+.TP
+.BI -r " offset"
+seek
+.I offset
+bytes from the standard input's current file offset
+.PP
+In all cases the file offset changes to
+reflect the result of the seek, and the number of bytes
+read.
+.SH SOURCE
+.B /appl/cmd/read.b
+.SH DIAGNOSTICS
+.I Read
+prints a diagnostic and returns a non-empty exit
+status
+.CW fail:error
+on an I/O error;
+it quietly returns status
+.CW fail:eof
+if the read returns zero bytes (conventionally, end of file).
+.SH SEE ALSO
+.IR cat (1),
+.I getline
+in
+.IR sh-std (1),
+.IR stream (1),
+.IR sys-read (2)