Skip to main content
LogoJuan Manuel Allo Ron

Tip: Syntax Highlighting with BAT

By Juan Manuel Allo Ron on May 7, 2020

Terminal command cat is a standard tool to print file contents to the console. I use it all the time but recently I found bat and it changed my life!

bat will also print file contents but provides syntax highlighting. If you use Homebrew it is super easy to install:

brew install bat

Here is an example of how the output will look like compared to cat:

Enjoy!!


Catch up with me on X (twitter):@juan_allo

Share

---

Similar Articles

@2025 Juan Manuel Allo Ron. All Rights reserved