Bat is a free and open source command line file reading application for Linux, Windows and MacOS. It is a clone of popular cat. Using bat, you can read data from the file and it gives their content as output. It comes with syntax highlighting, git integration, show non-printable characters, automatic paging, file concatenation, customizing and theming the output and many more. It is written in Rust and released under MIT and Apache 2.O.
How to Install Bat on Ubuntu
To install the bat on your Ubuntu Linux system, run below command.
sudo apt install bat
For the complete bat usage details run below command.
batcat [OPTIONS] [FILE]...
Example: To open a file, run below command. Below command will open a file name file.html in the Home directory. You can also display multiple files at once.
To show the non printable characters run below command.
batcat -A file.html