1MORE(1P) POSIX Programmer's Manual MORE(1P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
11
13 more — display files on a page-by-page basis
14
16 more [−ceisu] [−n number] [−p command] [−t tagstring] [file...]
17
19 The more utility shall read files and either write them to the terminal
20 on a page-by-page basis or filter them to standard output. If standard
21 output is not a terminal device, all input files shall be copied to
22 standard output in their entirety, without modification, except as
23 specified for the −s option. If standard output is a terminal device,
24 the files shall be written a number of lines (one screenful) at a time
25 under the control of user commands. See the EXTENDED DESCRIPTION sec‐
26 tion.
27
28 Certain block-mode terminals do not have all the capabilities necessary
29 to support the complete more definition; they are incapable of accept‐
30 ing commands that are not terminated with a <newline>. Implementations
31 that support such terminals shall provide an operating mode to more in
32 which all commands can be terminated with a <newline> on those termi‐
33 nals. This mode:
34
35 * Shall be documented in the system documentation
36
37 * Shall, at invocation, inform the user of the terminal deficiency
38 that requires the <newline> usage and provide instructions on how
39 this warning can be suppressed in future invocations
40
41 * Shall not be required for implementations supporting only fully
42 capable terminals
43
44 * Shall not affect commands already requiring <newline> characters
45
46 * Shall not affect users on the capable terminals from using more as
47 described in this volume of POSIX.1‐2008
48
50 The more utility shall conform to the Base Definitions volume of
51 POSIX.1‐2008, Section 12.2, Utility Syntax Guidelines, except that '+'
52 may be recognized as an option delimiter as well as '−'.
53
54 The following options shall be supported:
55
56 −c If a screen is to be written that has no lines in common with
57 the current screen, or more is writing its first screen, more
58 shall not scroll the screen, but instead shall redraw each
59 line of the screen in turn, from the top of the screen to the
60 bottom. In addition, if more is writing its first screen, the
61 screen shall be cleared. This option may be silently ignored
62 on devices with insufficient terminal capabilities.
63
64 −e Exit immediately after writing the last line of the last file
65 in the argument list; see the EXTENDED DESCRIPTION section.
66
67 −i Perform pattern matching in searches without regard to case;
68 see the Base Definitions volume of POSIX.1‐2008, Section 9.2,
69 Regular Expression General Requirements.
70
71 −n number Specify the number of lines per screenful. The number argu‐
72 ment is a positive decimal integer. The −n option shall over‐
73 ride any values obtained from any other source.
74
75 −p command
76 Each time a screen from a new file is displayed or redis‐
77 played (including as a result of more commands; for example,
78 :p), execute the more command(s) in the command arguments in
79 the order specified, as if entered by the user after the
80 first screen has been displayed. No intermediate results
81 shall be displayed (that is, if the command is a movement to
82 a screen different from the normal first screen, only the
83 screen resulting from the command shall be displayed.) If any
84 of the commands fail for any reason, an informational message
85 to this effect shall be written, and no further commands
86 specified using the −p option shall be executed for this
87 file.
88
89 −s Behave as if consecutive empty lines were a single empty
90 line.
91
92 −t tagstring
93 Write the screenful of the file containing the tag named by
94 the tagstring argument. See the ctags utility. The tags fea‐
95 ture represented by −t tagstring and the :t command is
96 optional. It shall be provided on any system that also pro‐
97 vides a conforming implementation of ctags; otherwise, the
98 use of −t produces undefined results.
99
100 The filename resulting from the −t option shall be logically
101 added as a prefix to the list of command line files, as if
102 specified by the user. If the tag named by the tagstring
103 argument is not found, it shall be an error, and more shall
104 take no further action.
105
106 If the tag specifies a line number, the first line of the
107 display shall contain the beginning of that line. If the tag
108 specifies a pattern, the first line of the display shall con‐
109 tain the beginning of the matching text from the first line
110 of the file that contains that pattern. If the line does not
111 exist in the file or matching text is not found, an informa‐
112 tional message to this effect shall be displayed, and more
113 shall display the default screen as if −t had not been speci‐
114 fied.
115
116 If both the −t tagstring and −p command options are given,
117 the −t tagstring shall be processed first; that is, the file
118 and starting line for the display shall be as specified by
119 −t, and then the −p more command shall be executed. If the
120 line (matching text) specified by the −t command does not
121 exist (is not found), no −p more command shall be executed
122 for this file at any time.
123
124 −u Treat a <backspace> as a printable control character, dis‐
125 played as an implementation-defined character sequence (see
126 the EXTENDED DESCRIPTION section), suppressing backspacing
127 and the special handling that produces underlined or standout
128 mode text on some terminal types. Also, do not ignore a
129 <carriage-return> at the end of a line.
130
132 The following operand shall be supported:
133
134 file A pathname of an input file. If no file operands are speci‐
135 fied, the standard input shall be used. If a file is '−', the
136 standard input shall be read at that point in the sequence.
137
139 The standard input shall be used only if no file operands are speci‐
140 fied, or if a file operand is '−'.
141
143 The input files being examined shall be text files. If standard output
144 is a terminal, standard error shall be used to read commands from the
145 user. If standard output is a terminal, standard error is not readable,
146 and command input is needed, more may attempt to obtain user commands
147 from the controlling terminal (for example, /dev/tty); otherwise, more
148 shall terminate with an error indicating that it was unable to read
149 user commands. If standard output is not a terminal, no error shall
150 result if standard error cannot be opened for reading.
151
153 The following environment variables shall affect the execution of more:
154
155 COLUMNS Override the system-selected horizontal display line size.
156 See the Base Definitions volume of POSIX.1‐2008, Chapter 8,
157 Environment Variables for valid values and results when it is
158 unset or null.
159
160 EDITOR Used by the v command to select an editor. See the EXTENDED
161 DESCRIPTION section.
162
163 LANG Provide a default value for the internationalization vari‐
164 ables that are unset or null. (See the Base Definitions vol‐
165 ume of POSIX.1‐2008, Section 8.2, Internationalization Vari‐
166 ables for the precedence of internationalization variables
167 used to determine the values of locale categories.)
168
169 LC_ALL If set to a non-empty string value, override the values of
170 all the other internationalization variables.
171
172 LC_COLLATE
173 Determine the locale for the behavior of ranges, equivalence
174 classes, and multi-character collating elements within regu‐
175 lar expressions.
176
177 LC_CTYPE Determine the locale for the interpretation of sequences of
178 bytes of text data as characters (for example, single-byte as
179 opposed to multi-byte characters in arguments and input
180 files) and the behavior of character classes within regular
181 expressions.
182
183 LC_MESSAGES
184 Determine the locale that should be used to affect the format
185 and contents of diagnostic messages written to standard error
186 and informative messages written to standard output.
187
188 NLSPATH Determine the location of message catalogs for the processing
189 of LC_MESSAGES.
190
191 LINES Override the system-selected vertical screen size, used as
192 the number of lines in a screenful. See the Base Definitions
193 volume of POSIX.1‐2008, Chapter 8, Environment Variables for
194 valid values and results when it is unset or null. The −n
195 option shall take precedence over the LINES variable for
196 determining the number of lines in a screenful.
197
198 MORE Determine a string containing options described in the
199 OPTIONS section preceded with <hyphen> characters and
200 <blank>-separated as on the command line. Any command line
201 options shall be processed after those in the MORE variable,
202 as if the command line were:
203
204 more $MORE options operands
205
206 The MORE variable shall take precedence over the TERM and
207 LINES variables for determining the number of lines in a
208 screenful.
209
210 TERM Determine the name of the terminal type. If this variable is
211 unset or null, an unspecified default terminal type is used.
212
214 Default.
215
217 The standard output shall be used to write the contents of the input
218 files.
219
221 The standard error shall be used for diagnostic messages and user com‐
222 mands (see the INPUT FILES section), and, if standard output is a ter‐
223 minal device, to write a prompting string. The prompting string shall
224 appear on the screen line below the last line of the file displayed in
225 the current screenful. The prompt shall contain the name of the file
226 currently being examined and shall contain an end-of-file indication
227 and the name of the next file, if any, when prompting at the end-of-
228 file. If an error or informational message is displayed, it is unspeci‐
229 fied whether it is contained in the prompt. If it is not contained in
230 the prompt, it shall be displayed and then the user shall be prompted
231 for a continuation character, at which point another message or the
232 user prompt may be displayed. The prompt is otherwise unspecified. It
233 is unspecified whether informational messages are written for other
234 user commands.
235
237 None.
238
240 The following section describes the behavior of more when the standard
241 output is a terminal device. If the standard output is not a terminal
242 device, no options other than −s shall have any effect, and all input
243 files shall be copied to standard output otherwise unmodified, at which
244 time more shall exit without further action.
245
246 The number of lines available per screen shall be determined by the −n
247 option, if present, or by examining values in the environment (see the
248 ENVIRONMENT VARIABLES section). If neither method yields a number, an
249 unspecified number of lines shall be used.
250
251 The maximum number of lines written shall be one less than this number,
252 because the screen line after the last line written shall be used to
253 write a user prompt and user input. If the number of lines in the
254 screen is less than two, the results are undefined. It is unspecified
255 whether user input is permitted to be longer than the remainder of the
256 single line where the prompt has been written.
257
258 The number of columns available per line shall be determined by examin‐
259 ing values in the environment (see the ENVIRONMENT VARIABLES section),
260 with a default value as described in the Base Definitions volume of
261 POSIX.1‐2008, Chapter 8, Environment Variables.
262
263 Lines that are longer than the display shall be folded; the length at
264 which folding occurs is unspecified, but should be appropriate for the
265 output device. Folding may occur between glyphs of single characters
266 that take up multiple display columns.
267
268 When standard output is a terminal and −u is not specified, more shall
269 treat <backspace> and <carriage-return> characters specially:
270
271 * A character, followed first by a sequence of n <backspace> charac‐
272 ters (where n is the same as the number of column positions that
273 the character occupies), then by n <underscore> characters ('_'),
274 shall cause that character to be written as underlined text, if the
275 terminal type supports that. The n <underscore> characters, fol‐
276 lowed first by n <backspace> characters, then any character with n
277 column positions, shall also cause that character to be written as
278 underlined text, if the terminal type supports that.
279
280 * A sequence of n <backspace> characters (where n is the same as the
281 number of column positions that the previous character occupies)
282 that appears between two identical printable characters shall cause
283 the first of those two characters to be written as emboldened text
284 (that is, visually brighter, standout mode, or inverse-video mode),
285 if the terminal type supports that, and the second to be discarded.
286 Immediately subsequent occurrences of <backspace>/character pairs
287 for that same character shall also be discarded. (For example, the
288 sequence "a\ba\ba\ba" is interpreted as a single emboldened 'a'.)
289
290 * The more utility shall logically discard all other <backspace>
291 characters from the line as well as the character which precedes
292 them, if any.
293
294 * A <carriage-return> at the end of a line shall be ignored, rather
295 than being written as a non-printable character, as described in
296 the next paragraph.
297
298 It is implementation-defined how other non-printable characters are
299 written. Implementations should use the same format that they use for
300 the ex print command; see the OPTIONS section within the ed utility. It
301 is unspecified whether a multi-column character shall be separated if
302 it crosses a display line boundary; it shall not be discarded. The
303 behavior is unspecified if the number of columns on the display is less
304 than the number of columns any single character in the line being dis‐
305 played would occupy.
306
307 When each new file is displayed (or redisplayed), more shall write the
308 first screen of the file. Once the initial screen has been written,
309 more shall prompt for a user command. If the execution of the user com‐
310 mand results in a screen that has lines in common with the current
311 screen, and the device has sufficient terminal capabilities, more shall
312 scroll the screen; otherwise, it is unspecified whether the screen is
313 scrolled or redrawn.
314
315 For all files but the last (including standard input if no file was
316 specified, and for the last file as well, if the −e option was not
317 specified), when more has written the last line in the file, more shall
318 prompt for a user command. This prompt shall contain the name of the
319 next file as well as an indication that more has reached end-of-file.
320 If the user command is f, <control>‐F, <space>, j, <newline>, d, <con‐
321 trol>‐D, or s, more shall display the next file. Otherwise, if display‐
322 ing the last file, more shall exit. Otherwise, more shall execute the
323 user command specified.
324
325 Several of the commands described in this section display a previous
326 screen from the input stream. In the case that text is being taken from
327 a non-rewindable stream, such as a pipe, it is implementation-defined
328 how much backwards motion is supported. If a command cannot be executed
329 because of a limitation on backwards motion, an error message to this
330 effect shall be displayed, the current screen shall not change, and the
331 user shall be prompted for another command.
332
333 If a command cannot be performed because there are insufficient lines
334 to display, more shall alert the terminal. If a command cannot be per‐
335 formed because there are insufficient lines to display or a / command
336 fails: if the input is the standard input, the last screen in the file
337 may be displayed; otherwise, the current file and screen shall not
338 change, and the user shall be prompted for another command.
339
340 The interactive commands in the following sections shall be supported.
341 Some commands can be preceded by a decimal integer, called count in the
342 following descriptions. If not specified with the command, count shall
343 default to 1. In the following descriptions, pattern is a basic regular
344 expression, as described in the Base Definitions volume of
345 POSIX.1‐2008, Section 9.3, Basic Regular Expressions. The term ``exam‐
346 ine'' is historical usage meaning ``open the file for viewing''; for
347 example, more foo would be expressed as examining file foo.
348
349 In the following descriptions, unless otherwise specified, line is a
350 line in the more display, not a line from the file being examined.
351
352 In the following descriptions, the current position refers to two
353 things:
354
355 1. The position of the current line on the screen
356
357 2. The line number (in the file) of the current line on the screen
358
359 Usually, the line on the screen corresponding to the current position
360 is the third line on the screen. If this is not possible (there are
361 fewer than three lines to display or this is the first page of the
362 file, or it is the last page of the file), then the current position is
363 either the first or last line on the screen as described later.
364
365 Help
366 Synopsis:
367 h
368
369 Write a summary of these commands and other implementation-defined com‐
370 mands. The behavior shall be as if the more utility were executed with
371 the −e option on a file that contained the summary information. The
372 user shall be prompted as described earlier in this section when end-
373 of-file is reached. If the user command is one of those specified to
374 continue to the next file, more shall return to the file and screen
375 state from which the h command was executed.
376
377 Scroll Forward One Screenful
378 Synopsis:
379 [count]f
380 [count]<control>-F
381
382 Scroll forward count lines, with a default of one screenful. If count
383 is more than the screen size, only the final screenful shall be writ‐
384 ten.
385
386 Scroll Backward One Screenful
387 Synopsis:
388 [count]b
389 [count]<control>-B
390
391 Scroll backward count lines, with a default of one screenful (see the
392 −n option). If count is more than the screen size, only the final
393 screenful shall be written.
394
395 Scroll Forward One Line
396 Synopsis:
397 [count]<space>
398 [count]j
399 [count]<newline>
400
401 Scroll forward count lines. The default count for the <space> shall be
402 one screenful; for j and <newline>, one line. The entire count lines
403 shall be written, even if count is more than the screen size.
404
405 Scroll Backward One Line
406 Synopsis:
407 [count]k
408
409 Scroll backward count lines. The entire count lines shall be written,
410 even if count is more than the screen size.
411
412 Scroll Forward One Half Screenful
413 Synopsis:
414 [count]d
415 [count]<control>-D
416
417 Scroll forward count lines, with a default of one half of the screen
418 size. If count is specified, it shall become the new default for subse‐
419 quent d, <control>‐D, and u commands.
420
421 Skip Forward One Line
422 Synopsis:
423 [count]s
424
425 Display the screenful beginning with the line count lines after the
426 last line on the current screen. If count would cause the current posi‐
427 tion to be such that less than one screenful would be written, the last
428 screenful in the file shall be written.
429
430 Scroll Backward One Half Screenful
431 Synopsis:
432 [count]u
433 [count]<control>-U
434
435 Scroll backward count lines, with a default of one half of the screen
436 size. If count is specified, it shall become the new default for subse‐
437 quent d, <control>−D, u, and <control>−U commands. The entire count
438 lines shall be written, even if count is more than the screen size.
439
440 Go to Beginning of File
441 Synopsis:
442 [count]g
443
444 Display the screenful beginning with line count.
445
446 Go to End-of-File
447 Synopsis:
448 [count]G
449
450 If count is specified, display the screenful beginning with the line
451 count. Otherwise, display the last screenful of the file.
452
453 Refresh the Screen
454 Synopsis:
455 r
456 <control>-L
457
458 Refresh the screen.
459
460 Discard and Refresh
461 Synopsis:
462 R
463
464 Refresh the screen, discarding any buffered input. If the current file
465 is non-seekable, buffered input shall not be discarded and the R com‐
466 mand shall be equivalent to the r command.
467
468 Mark Position
469 Synopsis:
470 mletter
471
472 Mark the current position with the letter named by letter, where letter
473 represents the name of one of the lowercase letters of the portable
474 character set. When a new file is examined, all marks may be lost.
475
476 Return to Mark
477 Synopsis:
478 'letter
479
480 Return to the position that was previously marked with the letter named
481 by letter, making that line the current position.
482
483 Return to Previous Position
484 Synopsis:
485 ''
486
487 Return to the position from which the last large movement command was
488 executed (where a ``large movement'' is defined as any movement of more
489 than a screenful of lines). If no such movements have been made, return
490 to the beginning of the file.
491
492 Search Forward for Pattern
493 Synopsis:
494 [count]/[!]pattern<newline>
495
496 Display the screenful beginning with the countth line containing the
497 pattern. The search shall start after the first line currently dis‐
498 played. The null regular expression ('/' followed by a <newline>) shall
499 repeat the search using the previous regular expression, with a default
500 count. If the character '!' is included, the matching lines shall be
501 those that do not contain the pattern. If no match is found for the
502 pattern, a message to that effect shall be displayed.
503
504 Search Backward for Pattern
505 Synopsis:
506 [count]?[!]pattern<newline>
507
508 Display the screenful beginning with the countth previous line contain‐
509 ing the pattern. The search shall start on the last line before the
510 first line currently displayed. The null regular expression ('?' fol‐
511 lowed by a <newline>) shall repeat the search using the previous regu‐
512 lar expression, with a default count. If the character '!' is
513 included, matching lines shall be those that do not contain the pat‐
514 tern. If no match is found for the pattern, a message to that effect
515 shall be displayed.
516
517 Repeat Search
518 Synopsis:
519 [count]n
520
521 Repeat the previous search for countth line containing the last pattern
522 (or not containing the last pattern, if the previous search was "/!" or
523 "?!").
524
525 Repeat Search in Reverse
526 Synopsis:
527 [count]N
528
529 Repeat the search in the opposite direction of the previous search for
530 the countth line containing the last pattern (or not containing the
531 last pattern, if the previous search was "/!" or "?!").
532
533 Examine New File
534 Synopsis:
535 :e [filename]<newline>
536
537 Examine a new file. If the filename argument is not specified, the cur‐
538 rent file (see the :n and :p commands below) shall be re-examined. The
539 filename shall be subjected to the process of shell word expansions
540 (see Section 2.6, Word Expansions); if more than a single pathname
541 results, the effects are unspecified. If filename is a <number-sign>
542 ('#'), the previously examined file shall be re-examined. If filename
543 is not accessible for any reason (including that it is a non-seekable
544 file), an error message to this effect shall be displayed and the cur‐
545 rent file and screen shall not change.
546
547 Examine Next File
548 Synopsis:
549 [count]:n
550
551 Examine the next file. If a number count is specified, the countth next
552 file shall be examined. If filename refers to a non-seekable file, the
553 results are unspecified.
554
555 Examine Previous File
556 Synopsis:
557 [count]:p
558
559 Examine the previous file. If a number count is specified, the countth
560 previous file shall be examined. If filename refers to a non-seekable
561 file, the results are unspecified.
562
563 Go to Tag
564 Synopsis:
565 :t tagstring<newline>
566
567 If the file containing the tag named by the tagstring argument is not
568 the current file, examine the file, as if the :e command was executed
569 with that file as the argument. Otherwise, or in addition, display the
570 screenful beginning with the tag, as described for the −t option (see
571 the OPTIONS section). If the ctags utility is not supported by the sys‐
572 tem, the use of :t produces undefined results.
573
574 Invoke Editor
575 Synopsis:
576 v
577
578 Invoke an editor to edit the current file being examined. If standard
579 input is being examined, the results are unspecified. The name of the
580 editor shall be taken from the environment variable EDITOR, or shall
581 default to vi. If the last pathname component in EDITOR is either vi
582 or ex, the editor shall be invoked with a −c linenumber command line
583 argument, where linenumber is the line number of the file line contain‐
584 ing the display line currently displayed as the first line of the
585 screen. It is implementation-defined whether line-setting options are
586 passed to editors other than vi and ex.
587
588 When the editor exits, more shall resume with the same file and screen
589 as when the editor was invoked.
590
591 Display Position
592 Synopsis:
593 =
594 <control>-G
595
596 Write a message for which the information references the first byte of
597 the line after the last line of the file on the screen. This message
598 shall include the name of the file currently being examined, its number
599 relative to the total number of files there are to examine, the line
600 number in the file, the byte number and the total bytes in the file,
601 and what percentage of the file precedes the current position. If more
602 is reading from standard input, or the file is shorter than a single
603 screen, the line number, the byte number, the total bytes, and the per‐
604 centage need not be written.
605
606 Quit
607 Synopsis:
608 q
609 :q
610 ZZ
611
612 Exit more.
613
615 The following exit values shall be returned:
616
617 0 Successful completion.
618
619 >0 An error occurred.
620
622 If an error is encountered accessing a file when using the :n command,
623 more shall attempt to examine the next file in the argument list, but
624 the final exit status shall be affected. If an error is encountered
625 accessing a file via the :p command, more shall attempt to examine the
626 previous file in the argument list, but the final exit status shall be
627 affected. If an error is encountered accessing a file via the :e com‐
628 mand, more shall remain in the current file and the final exit status
629 shall not be affected.
630
631 The following sections are informative.
632
634 When the standard output is not a terminal, only the −s filter-modifi‐
635 cation option is effective. This is based on historical practice. For
636 example, a typical implementation of man pipes its output through more
637 −s to squeeze excess white space for terminal users. When man is piped
638 to lp, however, it is undesirable for this squeezing to happen.
639
641 The −p allows arbitrary commands to be executed at the start of each
642 file. Examples are:
643
644 more −p G file1 file2
645 Examine each file starting with its last screenful.
646
647 more −p 100 file1 file2
648 Examine each file starting with line 100 in the current position
649 (usually the third line, so line 98 would be the first line writ‐
650 ten).
651
652 more −p /100 file1 file2
653 Examine each file starting with the first line containing the
654 string "100" in the current position
655
657 The more utility, available in BSD and BSD-derived systems, was chosen
658 as the prototype for the POSIX file display program since it is more
659 widely available than either the public-domain program less or than pg,
660 a pager provided in System V. The 4.4 BSD more is the model for the
661 features selected; it is almost fully upwards-compatible from the 4.3
662 BSD version in wide use and has become more amenable for vi users. Sev‐
663 eral features originally derived from various file editors, found in
664 both less and pg, have been added to this volume of POSIX.1‐2008 as
665 they have proved extremely popular with users.
666
667 There are inconsistencies between more and vi that result from histori‐
668 cal practice. For example, the single-character commands h, f, b, and
669 <space> are screen movers in more, but cursor movers in vi. These
670 inconsistencies were maintained because the cursor movements are not
671 applicable to more and the powerful functionality achieved without the
672 use of the control key justifies the differences.
673
674 The tags interface has been included in a program that is not a text
675 editor because it promotes another degree of consistent operation with
676 vi. It is conceivable that the paging environment of more would be
677 superior for browsing source code files in some circumstances.
678
679 The operating mode referred to for block-mode terminals effectively
680 adds a <newline> to each Synopsis line that currently has none. So, for
681 example, d<newline> would page one screenful. The mode could be trig‐
682 gered by a command line option, environment variable, or some other
683 method. The details are not imposed by this volume of POSIX.1‐2008
684 because there are so few systems known to support such terminals. Nev‐
685 ertheless, it was considered that all systems should be able to support
686 more given the exception cited for this small community of terminals
687 because, in comparison to vi, the cursor movements are few and the com‐
688 mand set relatively amenable to the optional <newline> characters.
689
690 Some versions of more provide a shell escaping mechanism similar to the
691 ex ! command. The standard developers did not consider that this was
692 necessary in a paginator, particularly given the wide acceptance of
693 multiple window terminals and job control features. (They chose to
694 retain such features in the editors and mailx because the shell inter‐
695 action also gives an opportunity to modify the editing buffer, which is
696 not applicable to more.)
697
698 The −p (position) option replaces the + command because of the Utility
699 Syntax Guidelines. The +command option is no longer specified by
700 POSIX.1‐2008 but may be present in some implementations. In early pro‐
701 posals, it took a pattern argument, but historical less provided the
702 more general facility of a command. It would have been desirable to use
703 the same −c as ex and vi, but the letter was already in use.
704
705 The text stating ``from a non-rewindable stream ... implementations may
706 limit the amount of backwards motion supported'' would allow an imple‐
707 mentation that permitted no backwards motion beyond text already on the
708 screen. It was not possible to require a minimum amount of backwards
709 motion that would be effective for all conceivable device types. The
710 implementation should allow the user to back up as far as possible,
711 within device and reasonable memory allocation constraints.
712
713 Historically, non-printable characters were displayed using the ARPA
714 standard mappings, which are as follows:
715
716 1. Printable characters are left alone.
717
718 2. Control characters less than \177 are represented as followed by
719 the character offset from the '@' character in the ASCII map; for
720 example, \007 is represented as 'G'.
721
722 3. \177 is represented as followed by '?'.
723
724 The display of characters having their eighth bit set was less stan‐
725 dard. Existing implementations use hex (0x00), octal (\000), and a
726 meta-bit display. (The latter displayed characters with their eighth
727 bit set as the two characters "M−", followed by the seven-bit display
728 as described previously.) The latter probably has the best claim to
729 historical practice because it was used with the −v option of 4 BSD and
730 4 BSD-derived versions of the cat utility since 1980.
731
732 No specific display format is required by POSIX.1‐2008. Implementations
733 are encouraged to conform to historic practice in the absence of any
734 strong reason to diverge.
735
737 None.
738
740 Chapter 2, Shell Command Language, ctags, ed, ex, vi
741
742 The Base Definitions volume of POSIX.1‐2008, Chapter 8, Environment
743 Variables, Section 9.2, Regular Expression General Requirements, Sec‐
744 tion 9.3, Basic Regular Expressions, Section 12.2, Utility Syntax
745 Guidelines
746
748 Portions of this text are reprinted and reproduced in electronic form
749 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
750 -- Portable Operating System Interface (POSIX), The Open Group Base
751 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
752 cal and Electronics Engineers, Inc and The Open Group. (This is
753 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
754 event of any discrepancy between this version and the original IEEE and
755 The Open Group Standard, the original IEEE and The Open Group Standard
756 is the referee document. The original Standard can be obtained online
757 at http://www.unix.org/online.html .
758
759 Any typographical or formatting errors that appear in this page are
760 most likely to have been introduced during the conversion of the source
761 files to man page format. To report such errors, see https://www.ker‐
762 nel.org/doc/man-pages/reporting_bugs.html .
763
764
765
766IEEE/The Open Group 2013 MORE(1P)