Find

PurposeFIND locates specified text and displays the lines containing the text at the terminal.  The search is case sensitive.

Syntax

F/IND/ [/AND/ SIGNAL] \\ [line1 [:line2];] ALL\\ "string" [,n]

FIND

issued with no options searches the entire file for "string" and displays each line containing it.

/AND/ SIGNAL

rings the bell or beeps (Control G) every time a line containing the string is found.

line1

is the line to be searched or the first line of a range to be searched.

line2

is the last line in a range to be searched.

ALL

specifies that all existing lines are to be searched for the string, this is the default condition when no n is specified.

string

is the character(s) to be located.  They are enclosed in delimiters.  Acceptable delimiters are pairs of quotation marks (" "), number signs (# #), dollar signs ($ $), or slashes (/ /).

n

specifies the number of repetitions that are to be found.

Example

--FIND "SECTION"
00010  CONTROL SECTION
00040  DECLARE SECTION
00090  INITIAL SECTION
00130  HEADINGS SECTION
00180  DETAILS SECTION
--

NOTES:  Up to ten single lines or line ranges can be specified, separated by commas.

If n is specified without a line range, the search begins at the current line and continues until n occurrences of "string" have been found.  If n is specified with one or more line ranges, the search begins at the first lines specified and continues until n occurrences of "string" have been found.