lolcat(1)
lolcat displays text in rainbow colors with optional animation effects.
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
| Flag | What it does |
|---|---|
-a, --animate | Animate the rainbow colors to shift over time |
-d DELAY | Set animation delay in milliseconds (default: 0) |
-s SPEED | Set color spread speed (default: 8) |
-f FREQ | Set frequency of color cycling (default: 0.1) |
-p | Do not read from stdin if no files given |
--version | Display version information |
-h, --help | Display help message |
Examples
Display hostname file in rainbow colors
lolcat /etc/hostnamePipe echo output through lolcat to colorize it
echo 'Hello World' | lolcatDisplay directory listing in rainbow colors
ls -la | lolcatDisplay file with animated rainbow effect and 50ms delay between frames
lolcat -a -d 50 /tmp/message.txtDisplay log file with slower color spread
cat /var/log/syslog | lolcat -s 20Display random fortune in rainbow colors
fortune | lolcat