Skip to main content
1 of 4
Peppe
  • 191
  • 1
  • 1
  • 4

Shell - Customize the color of each line of a log file based on a pattern

I would like to change the way I display a big (~6000 lines) log file using wim, less or whatever, in order to simplify the problem checking.

I'd like to highlight some line of the log based on a patter (i.e. erro, worning, info...) and/or hide some others.

Which tools could I use? Do I just need a shell script?

Thank you.

Peppe
  • 191
  • 1
  • 1
  • 4