Charles.Forsyth20060303-partialeea662d19 years agoHistory
62 lines · 1.0 KB · Text
RawDownload
.TH READ 1.SH NAMEread \- read from standard input with optional seek.SH SYNOPSIS.B read[.BR - [ eor ].I offset] [.I count].SH DESCRIPTION.I Readdoes a single read of.I countbytes (default:8192 bytes)from the standard input and writesthe result to the standard output.If the optional.I offsetargument is given,.I readwill first apply.IR sys-seek (2):.TP.BI -o " offset"seek.I offsetbytes from the start of the file.TP.BI -e " offset"seek.I offsetbytes from the end of the file.TP.BI -r " offset"seek.I offsetbytes from the standard input's current file offset.PPIn all cases the file offset changes toreflect the result of the seek, and the number of bytesread..SH SOURCE.B /appl/cmd/read.b.SH DIAGNOSTICS.I Readprints a diagnostic and returns a non-empty exitstatus.CW fail:erroron an I/O error;it quietly returns status.CW fail:eofif the read returns zero bytes (conventionally, end of file)..SH SEE ALSO.IR cat (1),.I getlinein.IR sh-std (1),.IR stream (1),.IR sys-read (2)