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.

Required fields*

6
  • 2
    grep --color will provide colour Commented Jan 3, 2014 at 18:05
  • It depends on what you want coloured, but grep --color '.' will give you everything in some colour (red when I try it). Commented Jan 3, 2014 at 18:08
  • This answered my question. I created an alias "alias color='grep --color .", then I use it like "locate -bir pdf | color" Commented Jan 3, 2014 at 18:20
  • Possible duplicate: How do I output coloured text to a Linux terminal? Commented Jun 11, 2021 at 23:01
  • @PeterMortensen The target you've suggested is for C++. This is a bash question. Commented Jun 11, 2021 at 23:58