HP NonStop G-Series User Manual
Page 223
![background image](/manuals/397048/223/background.png)
String-Range Parameter
Range Summary
5–20
058061 Tandem Computers Incorporated
NUM ordinal-range-list
is the keyword NUM followed by an ordinal-range-list, indicating
that EDIT should search for the occurrences of string at one or more
ordinal positions (first, third, seventh, and so on) of lines in the file.
(See the following Ordinal-Range-List description.)
How to Use the String-
Range Parameter
In addition to locating strings on specific (literal) lines, you can use the
NUM ordinal-range-list option to locate one or more strings in your file
by the ordinal position (first, third, tenth, and so on) of the line or lines
containing that string.
The ordinal position of the lines containing a string refers to how often
string occurs on one or more lines in the file. EDIT locates the first line
that contains string, goes to the next line that contains string, and so on,
until it locates string in the ordinal position of the line or lines specified
in the ordinal-range parameter. For example, if you specify NUM 5
with string, EDIT will locate the fifth line of your file that contains the
string, regardless of its line number. (See Example 7.)
When you give a left column number and a right column number, the
right column number must be equal to or greater than the left column
number (for example, 5:5 is valid, FIRST:LAST is valid, 15:7 is not
valid). If you only specify a left column number, string must begin in
that column; if you specify a left and right column number, string must
be within the boundaries of the column.