lolcat is a program that concatenates files, or standard input, to standard output (like the generic cat), and adds rainbow coloring to it.
In case you encounter the below error:
lolcat: command not found
you may try installing the below package as per your choice of distribution.
Distribution | Command |
---|---|
OS X | brew install lolcat |
Debian | apt-get install lolcat |
Ubuntu | apt-get install lolcat |
Arch Linux | pacman -S lolcat |
Kali Linux | apt-get install lolcat |
Raspbian | apt-get install lolcat |
lolcat Command Examples
1. Print a file to the console in rainbow colors:
$ lolcat path/to/file
2. Print the result of a text-producing command in rainbow colors:
$ fortune | lolcat
3. Print a file to the console with animated rainbow colors:
$ lolcat -a path/to/file
4. Print a file to the console with 24-bit (truecolor) rainbow colors:
$ lolcat -t path/to/file