beautypg.com

HP NonStop G-Series User Manual

Page 231

background image

Column-Range Parameter

Range Summary

5–28

058061 Tandem Computers Incorporated

How to Use the Column-

Range Parameter

You can use the column-range independently and also as an option
within the string-range-list parameter. 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.

If you want to pinpoint a column number (for example, to determine
the column where a particular string begins within a file), use the LIST
COL command with a line range. LIST COL tells EDIT to list one or
more lines while supplying a column number template above each
displayed line. (See “LIST Command” in Section 4 for additional
information.)

Examples

The current EDIT file for the following examples is:

6 As I was going to St. Ives

7 I met a man with seven wives

8 Each wife had seven sacks

9 Each sack had seven cats

10 Each cat had seven kits

11 Kits, cats, sacks, and wives

12 How many were going to St. Ives?

1.

The command:

*LIST "seven" COL 18:LAST

7 I met a man with seven wives

*

lists all lines that contain the string seven between columns 18 and the
last nonblank column.

This manual is related to the following products: