Find and Locate Commands
Two commands are available for searching the data file for a particular string (an existent or non-existent string). These are referred to as the FIND and LOCATE commands. The only difference between the operation of these two commands is the FIND command only matches the search string against the first data bytes in the record (entire record, field(s), or column(s)); while the LOCATE command scans the entire record (as above) to determine if the specified string exists anywhere within the data. Available commands are:
:F {string}
Beginning with the line after the current pointed line, match {string} against the first non-blank data characters. If a match is found, display that data line as the current pointed line. The data lines surrounding the matching line are also displayed.
:F
Repeat last FIND command as above.
:Fn {string}
Search for {string} beginning in field n.
:Fn,m {string}
Search for {string} beginning in field n and continuing the match through field m.
:Fn:m {string}
Search for {string} beginning in column n and continuing the match through column m.
:FA {string}
Search absolute for {string}. With the absolute search, leading blanks are not skipped. This causes the search to execute faster if searching for an execution label. The 'n' option may also be used in conjunction with the field(s) or column(s) specifications.
:FS {string}
Search for {string} as with the :F above. During the search, comment lines (lines that begin with a semi-colon, period, asterisk, or plus) are bypassed. The :FS command may be combined with the absolute and the field(s) or column(s) options.
:FU {string}
Case insensitive search for {string} as with the :F above.
:Fn {string}
Search for {string} to be non-existent in the data lines. If a line is found that contains {string}, that line is bypassed during the search. The :FN command may be combined with the skip, absolute, and field(s) or column(s) options.
:F*
Display the last {string} used in a delete, find or locate command.
:L{string}
Beginning with the line after the current pointed line, match {string} against the entire data line. If a match is found, display that data line as the current pointed line. The data lines surrounding the matching line are also displayed.
:L
Repeat last LOCATE command as above.
:L{space}
Get 1 line from source file.
:L{n} {string}
Search for {string} within field {n}.
:L{n},{m} {string}
Search for {string} beginning in field {n} and continuing the search through field {m}.
:L{n}:{m} {string}
Search for {string} beginning in column {n} and continuing the search through column {m}.
:LS {string}
Search for {string} as with the :L above. During the search, comment lines (lines that begin with a semi-colon, period, asterisk, or plus) are bypassed. The :LS command may be combined with the field(s) or column(s) options.
:LU {string}
Case insensitive search for {string} as with the :L above.
:LN {string}
Search for {string} to be non-existent in the data lines. If a line is found that contains {string}, that line is bypassed during the search. he :LN command may be combined with the skip, and field(s) or column(s) options.
:L*
Display the last {string} used in a delete, find or locate command.
Note the following:
The ESCAPE sequence is applicable to all :L and :F commands with the exception of the :L and :F* command.
See Also: Example Commands, SUNEDIT Commands, Line Edit Mode, SUNEDIT
![]() |