1 .\" @(#)pg.1 1.7 (gritter) 4/25/01
2 .TH PG 1 "2001-04-25" "Gunnar Ritter" "User Commands"
4 pg \- browse pagewise through text files
20 displays a text file on a
22 one screenful at once.
23 After each page, a prompt is displayed. The user may then either press the
24 newline key to view the next page or one of the keys described below.
26 If no filename is given on the command line,
28 reads from standard input.
29 If the standard output is not a terminal,
33 but precedes each file with its name if there is more than one.
35 If input comes from a pipe,
37 stores the data in a buffer file while reading
38 to make navigation possible.
41 accepts the following options:
44 The number of lines per page. Usually, this is the number of
50 Clear the screen before a page is displayed
51 if the terminfo entry for the terminal provides this capability.
55 will not pause and display
61 does not split long lines.
64 Without this option, commands must be terminated by a newline character. With
67 advances once a command letter is entered.
79 , its first occurence is replaced by the number of the current page.
82 Disallow the shell escape.
88 if the terminfo entry for the terminal provides this capability.
91 Start at the given line.
94 Start at the line containing the Basic Regular Expression
98 The following commands may be entered at the prompt. Commands preceeded by
100 in this document accept a number as argument, positive or negative.
101 If this argument starts with
105 it is interpreted relative to the current position in the input file,
106 otherwise relative to the beginning.
109 Display the next or the indicated page.
111 \fIi\fR\fBd\fR or \fB^D\fR
112 Display the next halfpage. If
114 is given, it is always interpreted relative to the current position.
117 Display the next or the indicated line.
122 must be a positive number and is always interpreted relative
123 to the current position.
125 \fIi\fR\fBw\fR or \fIi\fR\fBz\fR
130 becomes the new page size.
136 Advance to the last line of the input file.
139 Search forward until the first or the \fIi\fR-th
140 occurence of the Basic Regular Expression
142 is found. The search starts
143 after the current page and stops at the end of the file. No wrap-around is
146 must be a positive number.
148 \fIi\fR\fB?\fR\fIpattern\fR\fB?\fR or \fIi\fR\fB^\fR\fIpattern\fR\fB^\fR
149 Search backward until the first or the \fIi\fR-th
150 occurence of the Basic Regular Expression
152 is found. The search starts
153 before the current page and stops at the beginning of the file.
154 No wrap-around is performed.
156 must be a positive number.
158 The search commands accept an added letter. If
160 is given, the line containing the pattern is displayed at the top of the
161 screen, which is the default.
163 selects the middle and
165 the bottom of the screen.
166 The selected position is used in following searches, too.
169 Advance to the next file or
174 Reread the previous file or
179 Save the current file to the given
183 Display a command summary.
193 If the user presses the interrupt or quit key while
196 input file or writes on the terminal,
198 will immediately display the prompt.
199 In all other situations these keys will terminate
201 .SH "ENVIRONMENT VARIABLES"
202 The following environment variables
203 affect the behaviour of
207 Overrides the system-supplied number of columns if set.
209 .BR LANG ,\ LC_ALL ,\ LC_COLLATE ,\ LC_CTYPE ,\ LC_MESSAGES
214 Overrides the system-supplied number of lines if set.
222 Determines the terminal type.
233 expects the terminal tabulators to set on eight positions.
237 characters cannot be displayed by