I am stuck currently on this question while learning Linux. Can anyone help me?
Asked
Active
Viewed 102 times
0
2 Answers
1
From man man
, searching for 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.
It follows that man
may omit formatting in man ifconfig | less
, depending on environment settings. As others have noted, man ifconfig
itself may not open less
, also depending on environment settings (I have set it to open vim
).

muru
- 197,895
- 55
- 485
- 740
0
It seems that the text of the manual page is processed slightly different.
man
renders some of the text bold, which is not the case if you pipe the output to less
.
Another visual different is that man
shows a status line in the terminal.

mook765
- 15,925
man man
– glenn jackman Feb 21 '18 at 18:49man -P less ifconfig
– see the duplicate question I linked. – dessert Feb 21 '18 at 18:58