summaryrefslogtreecommitdiff
path: root/static/inferno/man1/read.1
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
commit97d5c458cfa039d857301e1ca7d5af3beb37131d (patch)
treeb460cd850d0537eb71806ba30358840377b27688 /static/inferno/man1/read.1
parentb89dc2331a50c63f8b33272a5c4c61ab98abdaa3 (diff)
build: Better Build System
Diffstat (limited to 'static/inferno/man1/read.1')
-rw-r--r--static/inferno/man1/read.162
1 files changed, 62 insertions, 0 deletions
diff --git a/static/inferno/man1/read.1 b/static/inferno/man1/read.1
new file mode 100644
index 00000000..09594f86
--- /dev/null
+++ b/static/inferno/man1/read.1
@@ -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
+.L fail:error
+on an I/O error;
+it quietly returns status
+.L 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)