col 中文man頁面

2020-12-25 51cto

col 中文man頁面

Col 過濾掉反向(以及半反向)換行符(LF: line feed or NL: new line), 這樣輸出按正常順序,即只包括正向和半正向換行符, 而且在可能的地方使用tab替換白空格.這對 nroff(1) 和 tbl(1) 的輸出處理很有用處.

作者:riser來源:CMPP.net|2011-08-11 18:19

NAME(名稱)

col - 過濾掉輸入中的反向換行符 

SYNOPSIS(總覽)

col [-bfx ] [ Fl l Ar num

DESCRIPTION(描述)

Col 過濾掉反向(以及半反向)換行符(LF: line feed or NL: new line), 這樣輸出按正常順序,即只包括正向和半正向換行符, 而且在可能的地方使用tab替換白空格.這對 nroff(1) 和 tbl(1) 的輸出處理很有用處.

col 從標準輸出讀入,並寫出到標準輸出上.

選項如下:

-b
不輸出任何退格符,在每列的位置上只列印***寫的那個字符.
-f
允許正向半換行符(``fine''模式). 通常,處於半行分界線上的字符列印在下一行.
-x
輸出多個空格以替換tab.
-l num
在內存中至少緩衝 num 行. 默認情況下,緩衝128行.

col 所能理解的用於回車操作的控制序列以及它們的十進位值都列在下面的表中:

ESC-7
反向換行符(escape後接7)
ESC-8
反向半換行符(escape後接8)
ESC-9
正向半換行符(escape後接9)
backspace
反向移動一列(8);在***列則忽略.
carriage return
(13)
newline
正向換行符(10);同時執行回車(carriage return)操作
shift in
轉到正常字符集(15)
shift out
轉到備選的字符集(14)
space
正向移動一列(32)
tab
正向移動到下一個tab(9)
vertical tab
反向換行符(11)

丟棄所有不被承認的控制字符和escape序列.

當讀取字符時, Col 保持著與字符集的聯繫,而且在輸出時確保字符集是正確的.

如果輸入設備試圖回復到最近被刷新的行, col 會顯示一條警告消息. 

SEE ALSO(另見)

expand(1), nroff(1), tbl(1) 

NAME

col - filter reverse line feeds from input 

SYNOPSIS

col [-bfpx ] [-l num

DESCRIPTION

Col filters out reverse (and half reverse) line feeds so the output is in the correct order with only forward and half forward line feeds, and replaces white-space characters with tabs where possible. This can be useful in processing the output of nroff(1) and tbl(1).

Col reads from standard input and writes to standard output.

The options are as follows:

-b
Do not output any backspaces, printing only the last character written to each column position.
-f
Forward half line feeds are permitted (``fine'' mode). Normally characters printed on a half line boundary are printed on the following line.
-p
Force unknown control sequences to be passed through unchanged. Normally, col will filter out any control sequences from the input other than those recognized and interpreted by itself, which are listed below.
-x
Output multiple spaces instead of tabs.
-l num
Buffer at least num lines in memory. By default, 128 lines are buffered.

The control sequences for carriage motion that col understands and their decimal values are listed in the following table:

ESC-7
reverse line feed (escape then 7)
ESC-8
half reverse line feed (escape then 8)
ESC-9
half forward line feed (escape then 9)
backspace
moves back one column (8); ignored in the first column
carriage return
(13)
newline
forward line feed (10); also does carriage return
shift in
shift to normal character set (15)
shift out
shift to alternate character set (14)
space
moves forward one column (32)
tab
moves forward to next tab stop (9)
vertical tab
reverse line feed (11)

All unrecognized control characters and escape sequences are discarded.

Col keeps track of the character set as characters are read and makes sure the character set is correct when they are output.

If the input attempts to back up to the last flushed line, col will display a warning message. 

SEE ALSO

expand(1), nroff(1), tbl(1) 

【責任編輯:

韓亞珊

TEL:(010)68476606】

點讚 0

相關焦點