There is a more modern version of the cat command called bat. Official Github Note that it was hard to figure out how to install this on Centos.
[Release page] Download the latest version of (https://github.com/sharkdp/bat/releases) for your environment.
I downloaded bat-v0.17.1-x86_64-unknown-linux-musl.tar.gz
.
I think this is fine for intel 64bit CentOS.
wget -O bat.zip https://github.com/sharkdp/bat/releases/download/v0.17.1/bat-v0.17.1-x86_64-unknown-linux-musl.tar.gz
tar -xvzf bat.zip -C /usr/local
cd /usr/local && mv bat-v0.17.1-x86_64-unknown-linux-musl bat
cd ~
alias bat="/usr/local/bat/bat" #Add alias
$ bat test.txt
You can use it with this. It's the same as the cat command. There are other ways to use it in combination with other commands, so I think the Official Japanese Page will be helpful.
Article that taught me bat https://qiita.com/navitime_tech/items/c249269a3b47666c784b
Official Github https://github.com/sharkdp/bat
issues325 https://github.com/sharkdp/bat/issues/325
Recommended Posts