The lolcat program is used for the above purpose. It basically functions by concatenating files, or standard input, to standard output in a similar way as the cat command, overrides the default screen output color of a particular command and adds rainbow coloring to it.
How to Install Lolcat Program in Linux
Lolcat program is available on almost all modern Linux distributions from its default repository, but the available version bit older. Alternatively, you can install the latest version of lolcat from the git repository.
Once lolcat installed, the basic syntax for running lolcat is:
$ lolcat [options] [files] ...
It comes with several options that control its behavior, below are a few of the most considerable flags we will emphasis for the scope of this guide:
-a – passes every input line through an animation effect.
-d – specifies the duration (number of steps before displaying next line) of the animation effect, the default value is 12.
-s – it specifies the speed (frame rate- number of steps per second) of the animation effect, default value is 20.
-f – enables forcing of coloring in case standard output is not a tty.
You can find more options in the lolcat man page:
$ man lolcat
How to Use Lolcat in Linux
To use lolcat, simply pipe the output of any relevant command to it and watch the magic.
$ ls -l | lolcat -as 25
lolcat display output in colorful fashion on Linux terminal using a relatively slow speed of 25 steps per second.