Is it possible to pipe output (e.g. dmesg
) to a command like less
(or equivalent) and keep the text highlighting used by the original command?
example: on the left dmesg | less
on the right dmesg
highlightinglesspipesyntax highlighting
Is it possible to pipe output (e.g. dmesg
) to a command like less
(or equivalent) and keep the text highlighting used by the original command?
example: on the left dmesg | less
on the right dmesg
Best Answer
Use the
--human
parameter to view coloreddmesg
output in aless
-like environment.Or use the short version:
Alternatively, use the following command to achieve similar results.
Many other utilities that produce colored output (
ls
,grep
, etc.) have a similar--color=always
option.