1 02/20/85  print, pr
  2 
  3 Syntax as a command:  pr paths {-control_args}
  4 
  5 
  6 Function: prints ASCII segments and multisegment files on user_output.
  7 
  8 
  9 Arguments:
 10 paths
 11    are the pathnames of the segments and multisegment files to be
 12    printed.  The star and archive component pathname conventions are
 13    accepted.
 14 
 15 
 16 Control arguments:
 17 -archive, -ac
 18    treats each archive component as a new file for heading and line
 19    numbering.  If any lines are printed from an archive component and
 20    if you supplied -header, prints a header identifying the archive
 21    component name and the date of modification of the archive
 22    component, in the format
 23       ARCHIVE::COMPONENT  date time
 24    where date and time are those stored in the archive.  This control
 25    argument is the default if archive components were named with the ::
 26    convention or if the entryname of the segment ends in .archive,
 27    unless you give -no_archive.
 28 -chase
 29    includes links in the search if a starname is specified, and does
 30    not complain about missing link targets for starnames.
 31 
 32 
 33 -exclude STRING, -ex STRING
 34    does not print lines containing STRING.  Exclusion is done after
 35    matching.  Thus, "-match A -exclude B" prints all lines with an A
 36    except those with a B.
 37 -exclude /REGEXP/, -ex /REGEXP/
 38    does not print lines containing a string matching the regular
 39    expression REGEXP.  (See the qedx command for the definition of
 40    regular expressions.)
 41 -for N
 42    prints N lines from the file, including the first line.  If you also
 43    use -to, printing stops when the first control argument is
 44    satisfied.  (Default: to print the whole file)
 45 -from X, -fm X
 46    begins printing from the Xth line.  This control argument and -last
 47    are incompatible.  (Default: line 1)
 48 
 49 
 50 -from /REGEXP/, -fm /REGEXP/
 51    begins with first line matching the regular expression REGEXP.
 52 -from_page P
 53    starts printing with the Pth page, counting the first page as 1.
 54    (Default: to start with page 1)
 55 -header, -he
 56    prints a header of the form
 57       NAME     date time
 58    before each segment.  If you choose -archive, the header is printed
 59    before each archive component instead of before each segment.  This
 60    control argument is the default if you give no other control
 61    argument or if you use the star convention or multiple pathnames.
 62 -indent N, -ind N
 63    indents the printed output N columns.  (Default: no indentation)
 64 
 65 
 66 -last N, -lt N
 67    print the last N lines from the file, or the last N lines of the
 68    region selected by -to.
 69 -left_col N, -lc N
 70    does not print columns 1 to N-1.  It truncates on the left, printing
 71    each line of the file starting with column N.  If a line has fewer
 72    than N columns, a blank line is printed.  (Default: to print
 73    starting with column 1)
 74 -line_length N, -ll N
 75    formats the page with a maximum physical line length of N
 76    characters.  Space generated by -indent and -number is not counted.
 77    If more than N characters are in an output line, the line is split
 78    and continued on the next line.  The default maximum line length is
 79    1024 characters although you can give larger values.
 80 
 81 
 82 -match STRING
 83    prints only lines containing the character string STRING.
 84 -match /REGEXP/
 85    prints only lines containing a string matching the regular
 86    expression REGEXP.
 87 -name NAME, -nm NAME
 88    takes NAME literally, even if it is all numeric or begins with "-".
 89 -no_archive, -nac
 90    does not print headings for individual archive components (even if
 91    the file being printed is an archive) and treats the file being
 92    printed as a single segment for line numbering and heading.
 93 -no_chase
 94    does not include links when processing starnames.  (Default)
 95 
 96 
 97 -no_header, -nhe
 98    suppresses the header before segments or archive components.  This
 99    is the default if you give only one pathname and other control
100    arguments.
101 -no_vertsp
102    simulates formfeed and vertical-tab characters by outputting newline
103    characters.
104 -number, -nb
105    prints line numbers before each line.  The line number and the
106    spaces separating it from the line take up 10 spaces.
107 -output_switch SWITCH_NAME, -osw SWITCH_NAME
108    directs the output to an attached and open (for stream output or
109    stream input/output) I/O switch.  If not supplied, the output is
110    directed to the user_output switch.
111 
112 
113 -page_length N, -pl N
114    starts a new page by inserting a formfeed character after every N
115    lines of the file are printed (see "Notes").  (Default: no
116    pagination)
117 -phys_page_length N, -ppl N
118    determines how many newline characters should be inserted between
119    pages when you specify -no_vertsp.  N, whose default value is 66, is
120    the number of lines on a whole page of paper.  (See "Notes.")
121 -right_col N, -rc N
122    does not print columns past N.  Lines extending past column N are
123    truncated on the right.  (Default: to print all columns)
124 -stop, -sp
125    pauses before the first page and after each successive page until
126    you type a newline.
127 
128 
129 -to N
130    stops printing with line number N.  (Default: to print all lines)
131 -to /REGEXP/
132    stops printing with the first line matching the regular expression
133    REGEXP.  The search for REGEXP begins after the first line printed.
134 -to_page N
135    stops printing after the Nth page.
136 -vertsp
137    sends formfeed and vertical-tab characters to the terminal.
138    (Default)
139 -wait, -wt
140    pauses before the first page until you type a newline.
141 
142 
143 Notes: The -page_length control argument works with -phys_page_length
144 to eject the proper amount of spacing between pages.  For example:
145    pr test_file -pl 40 -no_vertsp
146 prints 40 lines of the segment test_file and uses the default value for
147 -phys_page_length of 66 to emit 26 blank lines before the next 40 lines
148 are printed.  If you position the printer paper so that text begins
149 printing on the 13th line, then there are even amounts of leading and
150 trailing space on each page.
151 
152 If you select any of -line_length, -page_length, -phys_page_length, or
153 -right_col or -left_col is > 1, printing is done via the printer
154 conversion software: overstrikes are replaced by multiple lines
155 separated by CR (015) characters, and other control characters are
156 ignored.
157 
158 
159 Numeric arguments are processed specially for compatibility with
160 previous versions of print.  If no file name has been found, a number
161 is interpreted as a file name; other numeric arguments are interpreted
162 as -from and -to, in that order.  You can use -name to indicate that a
163 number is intended as a pathname.
164 
165 You can supply more than one -match and more than one -exclude; a line
166 is printed if any -match selects it unless one -exclude prevents it
167 from being printed.