$linuxjunkies
>

lolcat(1)

lolcat displays text in rainbow colors with optional animation effects.

UbuntuDebianFedoraArch

Synopsis

lolcat [OPTION]... [FILE]...

Description

lolcat reads files or standard input and outputs them to the terminal with rainbow color effects applied to each character. It's a fun utility for colorizing text output, commonly used to make shell scripts, logs, and command output visually entertaining.

If no files are specified, lolcat reads from standard input, making it easy to pipe output from other commands through it. It cycles through a spectrum of ANSI color codes to create the rainbow effect.

Common options

FlagWhat it does
-a, --animateAnimate the rainbow colors to shift over time
-d DELAYSet animation delay in milliseconds (default: 0)
-s SPEEDSet color spread speed (default: 8)
-f FREQSet frequency of color cycling (default: 0.1)
-pDo not read from stdin if no files given
--versionDisplay version information
-h, --helpDisplay help message

Examples

Display hostname file in rainbow colors

lolcat /etc/hostname

Pipe echo output through lolcat to colorize it

echo 'Hello World' | lolcat

Display directory listing in rainbow colors

ls -la | lolcat

Display file with animated rainbow effect and 50ms delay between frames

lolcat -a -d 50 /tmp/message.txt

Display log file with slower color spread

cat /var/log/syslog | lolcat -s 20

Display random fortune in rainbow colors

fortune | lolcat

Related commands