`bat` - a Modern Replacement for `cat`

How often do we use the cat (conCATenate) command? Well, I happened upon a nifty replacement for it, called bat. Rich with features, including a built-in configurable pager!

sudo apt install bat

On some distros (mine included), the resulting executable is called batcat. But in my .bash_aliases file I simply added alias cat='batcat' and now it works every time I call cat.

It has two help modes, as well: -h for a concise list, and --help for full details.

Read more about it here: https://www.cyberciti.biz/open-source/bat-linux-command-a-cat-clone-with-written-in-rust/

2 Likes

Thanks, Fred.

I’ve been using bat and I definitely cannot go back to cat again. The visual learner in me loves how everything is presented, per se, in a friendly way.

1 Like

I've even installed bat on my Macs! I use a terminal program (iTerm) frequently and macOS uses zsh by default, and bat works flawlessly there, too!

2 Likes

That’s good to know.

If I can get my super-old Macbook to work, I’ll give it a try.

1 Like