READ(1)                                                   READ(1)

     NAME
          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 stan-
          dard 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
          on an I/O error; it quietly returns status if the read
          returns zero bytes (conventionally, end of file).

     SEE ALSO
          cat(1), getline in sh-std(1), stream(1), sys-read(2)

     Page 1                       Plan 9            (printed 12/30/24)