Comando bat em substituição ao cat

Meet Bat, a cat clone with wings

We are not talking about bats and cats literally, but the famous "cat" command that allows you to view the contents of files on Linux. One of the curiosities of the open source world is that even basic, relatively simple and consolidated things like the "cat" command may have alternatives. Meet the bat today.

Bat command instead of cat Bat is a clone of the cat command that has Syntax Highlighting (output coloring according to document type), line numbering, and even Git integration, showing parts that were changed from the file according to the last commit.

In addition, it also has syntax highlighting themes for programming and marking languages, concatenation and file paging, and other features.

How to install?

To install "bat" on Debian, Ubuntu, Mint and derivatives run the following commands in order:

For 64-bit systems:

wget https://github/sharkdp/bat/releases/download/v0.9.0/bat_0.9.0_amd64.deb

sudo dpkg -i bat_0.9.0_amd64.deb

For 32-bit systems:

wget https://github/sharkdp/bat/releases/download/v0.9.0/bat_0.9.0_i386.deb

sudo dpkg -i bat_0.9.0_i386.deb

If you use Arch, Manjaro, Antergos and derivatives:

sudo pacman -S bat

If you have another (or any) distro, use:

For 64-bit systems:

wget https://github/sharkdp/bat/releases/download/v0.9.0/bat-v0.9.0-x86_64-unknown-linux-gnu.tar.gz

tar zxvf bat-v0.9.0-x86_64-unknown-linux-gnu.tar.gz

cd bat-v0.9.0-x86_64-unknown-linux-gnu /

sudo mv bat / usr / local / bin /

sudo mv bat.1 $ (man -w echo | sed 's / echo. * //')

For 32-bit systems:

wget https://github/sharkdp/bat/releases/download/v0.9.0/bat-v0.9.0-i686-unknown-linux-gnu.tar.gz

tar zxvf bat-v0.9.0-i686-unknown-linux-gnu.tar.gz

cd bat-v0.9.0-i686-unknown-linux-gnu /

sudo mv bat / usr / local / bin /

sudo mv bat.1 $ (man -w echo | sed 's / echo. * //')

And how do you use it?

Playing with the "bat" is as easy as the "cat" and I think it's only in the Linux world that phrase makes any sense, doesn't it?

To start using Bat, you can simply run the command bat (your_file) or if you want to start slowly, run the command bat –help for help, if you prefer, read directly from the manual with the command man bat.

Some examples for you to understand

Bat Instagram There are many other options for setting, reading and customizing colors you can do in Bat, just use the help or manual to get a better feel, another cool place to visit. the software repository on GitHub, there you also find a lot of information. If you do not have a good domain with terminal commands or wish to expand further, I recommend that you purchase the training offered here on the Diolinux blog along with the Terminal root and enjoy the exclusive packages. Learn more by clicking here..


_____________________________________________________________________________ See any errors or would you like to add any suggestions to this article? Collaborate, click here.