`cat` alternatives? i.e. `batcat` looks promising
Anyone using `batcat` or `lolcat` as `cat` alternatives? It's a bit of a niche use case, but they're interesting examples of some stodgy ol' utilities being re-imagined for the 2020s. The first I encountered, `lolcat`, has *beautiful* output, even if the name chaps my butt. Rainbow colours vertically and horizontally. It's dumb, but it sure is pretty. It rarely gets used. There's another one though that actually looks useful and might just replace cat & less: `batcat` (Ubuntu) or `bat` elsewhere: a `cat` clone "with wings". Anyone use this and have any tips? Curious what other think of it and of the "oxidization¹" of common tools (¹oxidation = enhancing & rewriting in Rust). Looks like 2025 is the year of modernizing some of my tools and this might get aliased to `less` and / or `cat`. https://github.com/sharkdp/bat/blob/master/README.md
bat: A cat Clone Written in Rust for Linux and Unix
Syntax highlighting – Bat supports syntax highlighting for a large number of programming and markup languages.
Git integration – Bat communicates with git to show modifications in left side.
Automatic paging – The command can pipe its own output to less if the output is too large for one screen.
Display and highlight non-printable characters.
A user-friendly command-line interface.
And of course, for file concatenation, including all of the cat command functionality.
On Thu, Sep 4, 2025 at 2:07 AM Ron via Talk <talk@lists.gtalug.org> wrote:
Anyone using `batcat` or `lolcat` as `cat` alternatives?
Tried it. Cute, but the novelty wore off quickly to me. Some parts of its rainbow output are harder to read off a black background than others. I find curious what seems to be a newfound interest in command-line innovation, some of which has found its way to this list. Combined with discussions of fish and hyprland, I wonder if there's simply an exhaustion of GUI development, and reinventing the Unix terminal experience seems quite the new thing. There's even a fairly new vim-"inspired" browser called Vieb <https://vieb.dev/>. Is this a trend, or just a coincidence of stuff we seem to be discovering at the same time? - Evan
On Thu, 4 Sept 2025 at 03:07, Evan Leibovitch via Talk <talk@lists.gtalug.org> wrote:
On Thu, Sep 4, 2025 at 2:07 AM Ron via Talk <talk@lists.gtalug.org> wrote:
Anyone using `batcat` or `lolcat` as `cat` alternatives?
Tried it.
Cute, but the novelty wore off quickly to me. Some parts of its rainbow output are harder to read off a black background than others.
I find curious what seems to be a newfound interest in command-line innovation, some of which has found its way to this list. Combined with discussions of fish and hyprland, I wonder if there's simply an exhaustion of GUI development, and reinventing the Unix terminal experience seems quite the new thing. There's even a fairly new vim-"inspired" browser called Vieb.
Is this a trend, or just a coincidence of stuff we seem to be discovering at the same time?
I've installed `batcat`, but I almost never use it. Largely because it's possible (although far more difficult, but I invested the time back when) to get `less` to syntax-highlight your code files. So ... probably just inertia, but I continue to use the older tools. Hmm - as a Debian user (same problem on Ubuntu), I have to admit the `batcat` name kind of stalled me: if it was just `bat` as on other platforms, I might have been able to remember it! A little self-promotion, how to colourize less: https://www.gilesorr.com/blog/pygmentize-less-update.html -- Giles https://www.gilesorr.com/ gilesorr@gmail.com
On Thu, Sep 4, 2025 at 2:07 AM Ron via Talk <talk@lists.gtalug.org> wrote:
Anyone using `batcat` or `lolcat` as `cat` alternatives?
I use cat to send the output of a file to another program via a pipe. If I just want to quickly read something I use less. -- Cheers! Kevin. http://www.ve3syb.ca/ | "Nerds make the shiny things that https://www.patreon.com/KevinCozens | distract the mouth-breathers, and | that's why we're powerful" Owner of Elecraft K2 #2172 | #include <disclaimer/favourite> | --Chris Hardwick
I installed batcat a while ago, but don't use it much. alias bat=batcat And using cat to send a single file to a pipe may earn you an UUCA ( https://porkmail.org/era/unix/award) Mauro https://www.maurosouza.com - registered Linux User: 294521 Scripture is both history, and a love letter from God. On Thu, Sep 4, 2025 at 1:02 PM Kevin Cozens via Talk <talk@lists.gtalug.org> wrote:
On Thu, Sep 4, 2025 at 2:07 AM Ron via Talk <talk@lists.gtalug.org> wrote:
Anyone using `batcat` or `lolcat` as `cat` alternatives?
I use cat to send the output of a file to another program via a pipe. If I just want to quickly read something I use less.
-- Cheers!
Kevin.
http://www.ve3syb.ca/ | "Nerds make the shiny things that https://www.patreon.com/KevinCozens | distract the mouth-breathers, and | that's why we're powerful" Owner of Elecraft K2 #2172 | #include <disclaimer/favourite> | --Chris Hardwick ------------------------------------ Description: GTALUG Talk Unsubscribe via Talk-unsubscribe@lists.gtalug.org Start a new thread: talk@lists.gtalug.org This message archived at https://lists.gtalug.org/archives/list/talk@lists.gtalug.org/message/NFNTJJX...
On 2025-09-04 14:47, Mauro Souza via Talk wrote:
And using cat to send a single file to a pipe may earn you an UUCA (https://porkmail.org/era/unix/award)
what about something like "ssh remotesystem.example.com tar -cf - /alice | cat - > alice.tar" It is fairly shell agnostic. I am sure that there 100 ways to do the same thing in bash but the above worked on the first BSD system I used and still works the same way now. -- Alvin Starr || land: (647)478-6285 Netvel Inc. || home: (905)513-7688 alvin@netvel.net ||
On 2025-09-04 19:56, D. Hugh Redelmeier via Talk wrote:
From: Alvin Starr via Talk <talk@lists.gtalug.org> what about something like "ssh remotesystem.example.com tar -cf - /alice | cat - > alice.tar" "ssh remotesystem.example.com tar -cf - /alice > alice.tar"
DOH. I should have known that. -- Alvin Starr || land: (647)478-6285 Netvel Inc. || home: (905)513-7688 alvin@netvel.net ||
Giles Orr via Talk wrote on 2025-09-04 06:15:
I've installed `batcat`, but I almost never use it. Largely because it's possible (although far more difficult, but I invested the time back when) to get `less` to syntax-highlight your code files.
I had no idea.
A little self-promotion, how to colourize less: https://www.gilesorr.com/blog/pygmentize-less-update.html
Thanks - I'd never heard of "pygmantize" and it sounds neat. I may have a use for it similar to yours: embedding code in a web page. In the past, I've used VS Code, copied the code from there, and when pasting it one can get either The Text or Syntax Highlighted Text, depending on the tool used to paste. Running it through `pygmantize` might work better.
Evan Leibovitch wrote on 2025-09-04 00:05:
Anyone using `batcat` or `lolcat` as `cat` alternatives?
Cute, but the novelty wore off quickly to me.
Good description of `lolcat`, still undecided on `batcat`. I really do find the idea of syntax highlighting in `less` to be very appealing.
I find curious what seems to be a newfound interest in command-line innovation, some of which has found its way to this list. Combined with discussions of fish and hyprland, I wonder if there's simply an exhaustion of GUI development
Other than KDE, I don't think there's much going on in GUIs these days? Cosmic seems stalled and Gnome seems to be going backwards by removing options. That might be unfair, they do seem to be doing some good things, just not in a way that interests me. So, I can only speak from 3rd-hand experience; I only use KDE.
and reinventing the Unix terminal experience seems quite the new thing.
Is this a trend, or just a coincidence of stuff we seem to be discovering at the same time?
I think it's a trend. <speculation> The younger tech enthusiasts are looking to make their mark, they're looking to use the latest tools (Rust) to dive deeply into some common tools as learning experiences, and they're not as invested in the cruftiness of some of those tools. Plus, they can use the existing unit tests to ensure compatibility where desired. Those of us who've used these tools since forever are just used to them, where someone earlier in their career might not accept that things have always been that way, just "because". Like in how my father's generation, tools with comfy grips and safety features were just not a thing, now it's expected. </speculation> Feels invigorating, like 1990s internet rapid development some how.
From: Ron via Talk <talk@lists.gtalug.org>
Anyone using `batcat` or `lolcat` as `cat` alternatives?
<https://harmful.cat-v.org/cat-v/> This gets you to Rob Pike's "UNIX Style, or cat -v Considered Harmful" He and I whined about this before he gave this talk. I don't know that our discussion contributed to it.
On Wed, 3 Sep 2025 23:06:57 -0700 Ron via Talk <talk@lists.gtalug.org> wrote:
Anyone using `batcat` or `lolcat` as `cat` alternatives?
Ron, I don't recall the last time I used `cat` from the command line. Either I use `less`, or I drop the file into Emacs. I think I have used `cat` in scripts where I just want text dumped. How do I Google information on `lolcat` and find out about text readers? -- Howard Gibson hgibson@eol.ca http://home.eol.ca/~hgibson
Holy hell, I just looked at the usage for `lolcat` and ... it does *animation*. This is almost as good as watching my Matrix green rain screen saver. Maybe better - more colours. `lolcat --animate --speed 50 --duration 2 progress-bar.fish` There's some truly hypnotic output. Like an RGB rave party in my terminal. I actually like this more now - it's not quite as useless as I though. Howard Gibson via Talk wrote on 2025-09-04 20:34:
I don't recall the last time I used `cat` from the command line.
Yeah, I only do it for files I know are less than a screen full *and* I want to refer to the file's contents when crafting another command.
How do I Google information on `lolcat` and find out about text readers?
Google "lolcat linux": https://www.google.com/search?q=lolcat+linux&uact=5&oq=lolcat+linux Offers this link: https://github.com/busyloop/lolcat
/ You can stream the output of cat into \ \ cowsay. Does that help? / --------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||
Funny you should mention that: the Github link above combines `cowsay` and `lolcat` thusly: `fortune | cowsay | lolcat` which shows very pretty and entirely useless results. Interestingly enough, that link also recommends installing with `snap install lolcat`. Didn't expect that.
From: Ron via Talk <talk@lists.gtalug.org>
Holy hell, I just looked at the usage for `lolcat` and ... it does *animation*. This is almost as good as watching my Matrix green rain screen saver. Maybe better - more colours.
Interestingly enough, that link also recommends installing with `snap install lolcat`. Didn't expect that.
How big is the binary? How big is the SNAP? On 6th Edition UNIX (https://research.swtch.com/v6/): 6th edition has only static linking: the size includes all the libraries used. % size /bin/cat 136+0+1026=1162 (2212) On Fedora 42 on x86-64: $ size /bin/cat text data bss dec hex filename 28669 1608 368 30645 77b5 /bin/cat It is much larger if you include the shared libraries. Of course shared libraries are shared. Most processes would by using the single copy of these. text data bss dec hex filename 1978761 19256 34224 2032241 1f0271 /lib64/libc.so.6 211625 10500 2696 224821 36e35 /lib64/ld-linux-x86-64.so.2
D. Hugh Redelmeier via Talk wrote on 2025-09-06 09:59:
How big is the binary?
$ ll $(which lolcat) -rwxr-xr-x 2 root root 1615 2020-03-30 03:08 /usr/local/bin/lolcat* $ file $(which lolcat) /usr/local/bin/lolcat: Ruby script, ASCII text executable Contains 3 lines of un-commented code: #!/usr/bin/ruby require "lolcat/version" require "lolcat/cat" Lol.cat! Unsure how to measure what resources these consume.
How big is the SNAP?
$ snap info lolcat name: lolcat summary: Rainbows and unicorns! publisher: moe (busyloop) store-url: https://snapcraft.io/lolcat license: unset description: | Must be installed on every computer. snap-id: epDTVrTkFtaYOIpqFL9URjntZYDzJxI1 channels: latest/stable: 100.0.1 2020-04-24 (1) 31MB - latest/candidate: 100.0.1 2020-04-24 (1) 31MB - latest/beta: ↑ latest/edge: ↑
On 6th Edition UNIX (https://research.swtch.com/v6/):
6th edition has only static linking: the size includes all the libraries used.
% size /bin/cat 136+0+1026=1162 (2212)
On Fedora 42 on x86-64: $ size /bin/cat text data bss dec hex filename 28669 1608 368 30645 77b5 /bin/cat
$ size $(which batcat) text data bss dec hex filename 5053951 224136 1272 5279359 508e7f /usr/bin/batcat $ size $(which batcat) -G text data bss total filename 2675351 2602736 1272 5279359 /usr/bin/batcat $ file $(which batcat) /usr/bin/batcat: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=eed713d22760579469038b51ceec286bbafe468b, for GNU/Linux 3.2.0, stripped
On Wed, 3 Sep 2025 23:06:57 -0700 Ron via Talk <talk@lists.gtalug.org> wrote:
Anyone using `batcat` or `lolcat` as `cat` alternatives?
Ron, / You can stream the output of cat into \ \ cowsay. Does that help? / --------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || -- Howard Gibson hgibson@eol.ca http://home.eol.ca/~hgibson
Ron via Talk wrote on 2025-09-03 23:06:
There's another one though that actually looks useful and might just replace cat & less: `batcat`
Found a bit of a show-stopper: when examining multiple files with `batcat`, all files get concatenated then displayed. Files are unchanged, of course, but it's impossible to :n or :p to switch next / previous files like in `less`. Took me this long to realize why it's called a replacement for `cat` not for `less`. It has its own pager but this is a fairly important feature to be missing. I'm going to continue using it as a replacement for `man` because of the colourization. Works well in `fish` but haven't figured out `bash` yet, needs an alias like: alias man='/usr/bin/man "$@" | batcat -l man' and after a couple failed attempts, decided it does not matter since I use `fish`.
participants (8)
-
Alvin Starr -
D. Hugh Redelmeier -
Evan Leibovitch -
Giles Orr -
Howard Gibson -
Kevin Cozens -
Mauro Souza -
Ron