col 中文man頁面
NAME(名稱)
col - 過濾掉輸入中的反向換行符
SYNOPSIS(總覽)
col [-bfx ] [ Fl l Ar num ]
DESCRIPTION(描述)
Col 過濾掉反向(以及半反向)換行符(LF: line feed or NL: new line), 這樣輸出按正常順序,即只包括正向和半正向換行符, 而且在可能的地方使用tab替換白空格.這對 nroff(1) 和 tbl(1) 的輸出處理很有用處.
col 從標(biāo)準(zhǔn)輸出讀入,并寫出到標(biāo)準(zhǔn)輸出上.
選項(xiàng)如下:
- -b
- 不輸出任何退格符,在每列的位置上只打印***寫的那個(gè)字符.
- -f
- 允許正向半換行符(``fine''模式). 通常,處于半行分界線上的字符打印在下一行.
- -x
- 輸出多個(gè)空格以替換tab.
- -l num
- 在內(nèi)存中至少緩沖 num 行. 默認(rèn)情況下,緩沖128行.
col 所能理解的用于回車操作的控制序列以及它們的十進(jìn)制值都列在下面的表中:
- ESC-7
- 反向換行符(escape后接7)
- ESC-8
- 反向半換行符(escape后接8)
- ESC-9
- 正向半換行符(escape后接9)
- backspace
- 反向移動(dòng)一列(8);在***列則忽略.
- carriage return
- (13)
- newline
- 正向換行符(10);同時(shí)執(zhí)行回車(carriage return)操作
- shift in
- 轉(zhuǎn)到正常字符集(15)
- shift out
- 轉(zhuǎn)到備選的字符集(14)
- space
- 正向移動(dòng)一列(32)
- tab
- 正向移動(dòng)到下一個(gè)tab(9)
- vertical tab
- 反向換行符(11)
丟棄所有不被承認(rèn)的控制字符和escape序列.
當(dāng)讀取字符時(shí), Col 保持著與字符集的聯(lián)系,而且在輸出時(shí)確保字符集是正確的.
如果輸入設(shè)備試圖回復(fù)到最近被刷新的行, col 會(huì)顯示一條警告消息.
SEE ALSO(另見)
expand(1), nroff(1), tbl(1)
#p#
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)