当我学习Linux的时候,我被困在这个问题上了。有谁可以帮我?
发布于 2018-02-22 07:51:44
从man man搜索pipe:
MAN_KEEP_FORMATTING
Normally, when output is not being directed to a terminal (such
as to a file or a pipe), formatting characters are discarded to
make it easier to read the result without special tools.
However, if $MAN_KEEP_FORMATTING is set to any non-empty value,
these formatting characters are retained. This may be useful
for wrappers around man that can interpret formatting
characters.因此,根据环境设置,man可能省略man ifconfig | less中的格式设置。正如其他人所指出的,man ifconfig本身可能不会打开less,这也取决于环境设置(我已经将其设置为打开vim)。
发布于 2018-02-21 18:56:23
似乎手册页的文本处理略有不同。man将一些文本呈现为粗体,如果将输出输送到less,则情况并非如此。另一个视觉上的不同是,man显示终端中的状态行。
https://askubuntu.com/questions/1008472
复制相似问题