星期四, 八月 23, 2007

把man手册打印出来看的方法

col命令蛮好用的
COL(1) BSD General Commands Manual COL(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 for-
ward 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.
-lnum Buffer at least num lines in memory. By default, 128 lines are buffered.




如果我们要把某个程序的man手册打印出来,可以这样
man ettercap |col -b >ettercap_man.txt
这样就可以再加工并打印出来了
哈哈

没有评论: