Color Linux command output

后端 未结 10 1338
天命终不由人
天命终不由人 2020-12-09 19:03

For example, I\'d like to color the output of the locate command so it\'s easily distinguished from the other terminal text.

It should work something li

10条回答
  •  囚心锁ツ
    2020-12-09 19:36

    You should have a look at the hl command available on git hub:

    git clone http://github.com/mbornet-hl/hl
    

    and on :

    http://www.flashnux.com/notes/page_000022_US.html

    hl is a Linux command written in C, especially designed to color a text file or the output of a command. You can use up to 42 colors simultaneously, and use a configuration file to simplify command lines. You can colorize the output of every command that can be piped to another one. And if you know what regular expressions are, it will be very easy for you to use. You can use the man page to understand how to use it.

提交回复
热议问题