beautypg.com

Range summary 5–34, The command – HP NonStop G-Series User Manual

Page 237

background image

Ordinal-Range Parameter

Range Summary

5–34

058061 Tandem Computers Incorporated

Examples

Suppose the current EDIT file named BIRD contains these lines:

1 The king was in his counting-house

2 Counting all his money.

3 The queen was in the parlor

3.1 Eating bread and honey.

3.2 The maid was in the garden

4 Hanging up the clothes.

4.1 Along came a blackbird

5 And snipped off her nose!

1.

The command:

*LIST "the" NUM FIRST

3 The queen was in the parlor

*

lists the first line that contains the string the, which is line 3. Note that
The occurs as the first word of lines 1 and 3, but without the BOTH
keyword in the command line, EDIT only matched the string the exactly
as it was typed.

2.

The command:

*LIST "in" NUM 4/6

3.1 Eating bread and honey.

3.2 The maid was in the garden

4 Hanging up the clothes

*

lists the fourth, fifth, and sixth lines that contain the string in, which are
lines 3.1, 3.2, and 4. The first four lines of the file contains the string in
six times; note that line 1 has in as both the word in and as a string
inside the words king and counting. However, EDIT is searching for the
first line that contains the string, the second line, and so on; EDIT
ignores how many times the string occurs on each line.

This manual is related to the following products: