Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Yes defining a function in your awk script seems appropriate to avoid being redundant. Also thanks for the raw mode in less, that is great ! Works with my solution too by piping the output. Commented Oct 25, 2016 at 12:26
  • I didn't know that awk allows to use function like this!!! Thank you Commented Oct 26, 2016 at 7:15
  • EDIT: See also: stackoverflow.com/questions/981601/… What about sed command? something like .. sed /INFO/s/^/<begin_color>/ and something with /$/<end_color>. Where begin would be \033[...` and end will be \033[0m. Commented Mar 20, 2019 at 16:54