Bat overview

Bat is a cat clone tool with many extra features:

  • Syntax highlighting
  • Git integration
  • Show non-printable characters
  • Automatic paging
  • File concatenation

Installation

For a macOs sytem.
(For other systems check the specific installation description in the documentation)

❯ brew install bat

Usage

Display a single file on the terminal

❯ bat file.txt

Display multiple files at once

❯ bat *.txt

Read from the stdin and detect the syntax automatically

❯ curl https://google.com | bat

(To set the language to be used for the syntax highlighting -l <language> is used)

Show and highlight non-printable characters

❯ bat -A file.txt

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *