This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Built-in Functions / Input and Output / File Input /


FilledSmallSquare Find[stream, "text"] finds the first line in an input stream that contains the specified string.

FilledSmallSquare Find[stream, "", "", ... ] finds the first line that contains any of the specified strings.

FilledSmallSquare Find breaks the input stream into records, delimited by record separators, and scans each record for the strings you specify.

FilledSmallSquare Find returns as a string the first record which contains the specified text.

FilledSmallSquare If Find does not find any record which contains the specified text before it reaches the end of the file, it returns EndOfFile.

FilledSmallSquare The following options can be given:

FilledSmallSquare The first argument to Find can be InputStream["name", n], or simply "name" if there is only one open input stream with the specified name.

FilledSmallSquare You can open a file or pipe to get an InputStream object using OpenRead.

FilledSmallSquare Find does not close streams after it finishes reading from them.

FilledSmallSquare See Section 2.12.9.

FilledSmallSquare See also: Read, Skip, StreamPosition, StringToStream, NotebookFind.

FilledSmallSquare New in Version 2.