pr

print files

pr [+page] [-column c ] [-adFfmprt] [[-e][char [gap]] [-L locale] [-hheader] [[-i][char][gap]] [-l lines] [-o offset] [[-s][char]] [[-n] [char] [width]] [-w width] [-] [file …]

version differs slightly from linux


If standard output is a terminal(printer), diagnostic messages are suppressed until the completed .

When multiple column output is specified, columns are of equal width. are separated by at least one space and
input lines that do not fit into a column are truncated..

-m Merge the contents of multiple files.
One line from each file side by side in columns of equal fixed widths.
The column width depends on the number of files.
The maximum number of files merged depends on page width. Implies -e (expand input tabs) and -i (insert tabs on output).
 
-w width Set the width of the line to width positions for multiple column output.
If -w and -s (seperator) are not specified, the default is 72.
If -w is not specified and -s is specified, the default is 512.
-column columns output is columns wide (default is 1) written vertically down each column
This implies -e(expand tabs) and -i .
should not be used with -m.
With -t, the minimum number of lines is used to display the output.
Example with -column 2




    
-t Supress header and trailer.
After the last line of each file do not space to the end of the page.
-a columns are filled across the page with -column, in a round-robin order (e.g., when column is 2, the first input line heads column 1, the second heads column 2, the third is the second line in column 1, etc.).
-d double spaced.
-e[char][gap] Expand <tab>s to <spaces> to the next column position
(specified by the formula n*gap+1, where n is > 0. )
The default gap is 8.
If any nondigit character, char, is specified, it is used as the input tab character.
-i[char][gap] Insert <tabs> to replace multiple <space>s to reach column positions gap+1, 2*gap+1, etc.
If gap is zero or omitted, default <tab> settings at every 8th column .
If any nondigit character, char, is specified, it is used as the output <tab> character.
-F Use <form-feed> for new pages.
-f <form-feed>s and pause before the first page if standard output is a terminal (printer).
-h header in the header, header replaces the file name .
-L locale Use locale for heading.
> export LC_ALL=de_DE  # use German (Deutschland) 
 4 Nov 17:55 2021 littleSistersV_PA.txt Page 2

> export LC_ALL=en_US
Nov  4 17:55 2021 littleSistersV_PA.txt Page 1

    
-l lines Set the page length to lines default 66.
If lines is less than the sum of both the header and trailer depths (in lines), both the header and trailer are supressed
-n[char][n] Provide line numbering of n digits. default 5.
The number occupies the first n columns of each column or each line of -m output.
char (any nondigit character, default <tab>. ) is appended to the line number.
Line numbers are reset for each file.
Line numbers longer than n are truncated.
for example
 pr -n: -o 8 -p -h 'Default image mape' testC.map  ccgg



        Nov 11 23:22 2021 Default image mape Page 1


            1:
            2:Name             Origin             Length             Attributes
            3:FLASH           00026000000000000004f000 xr
            4:RAM             20002450000000000000dbb0 xrw
            5:uicr_bootloader_start_address00000ff80000000000000004 r
            6:uicr_mbr_params_page00000ffc0000000000000004 r
            7:mbr_params_page 0007e0000000000000001000 r
            8:bootloader_settings_page0007f0000000000000001000 r
            9:*default*       00000000ffffffffffffffff
           10:
           11:Linker script and memory map
           12:
           13:
           14:.text          00026000   25994
           15: *(.isr_vector)
           16: .isr_vector   00026000     200 gcc_startup_nrf52.S
           17:               00026000                __isr_vector
           18: *(.text*)
           19: .text         00026240      74 crt0
           20:               00026240                _mainCRTStartup
           21:               00026240                _start
           22: .text.fill_filter_settings
           23:               000262b4      16 bme280.c
…
           52:               000268aa      52 bme280.c
           53: .text.bme280_set_regs
           54:               000268fc      8c bme280.c
           55:               000268fc                bme280_set_regs
           56: .text.set_osr_humidity_settings



 Expected perferation or fold or kkinsert next sheet here 

    


        Nov 11 23:22 2021 Default image mape Page 2


           57:               00026988      5a bme280.c
           58: .text.set_osr_press_temp_settings
           59:               000269e2      5c bme280.c
… 

    
-o offset Lines are offset by offset <space>s. The default is zero. The space is in addition to the output line width.
+page First page number
Page number is recet for each file.
-p Pause before each page if the standard output is a terminal(printer), outputs alert character and waits for a return
-r No failure messages are written
-schar Separate columns by char instead of <space>s. Default is <tab>
The -s must immediately be folllowed by char
file A pathname to be printed. If no file is specified, or is '-', standard input is used.

-e, -i, and -n require both arguments, if present, not be separated from the option letter.

An interrupt while printing to a terminal(printer), flushes error messages before terminating.

If output is redirected, error messages are written to standard error during printing
When printing to a terminal(printer) they are output after printing is complete

See

cat(1), more(1), compat(5) rs)