#!/usr/bin/env bash
#
tail -F \
/var/log/maillog \
/var/log/messages \
|
while read -r line
do printf \
"\033[38;5;%dm%s\033[0m\n" \
$(($RANDOM%214+17)) \
"$line"
done
#
# Follow log files, showing each
# line in a random color.
# Needs a 256-color terminal,
# works best on dark/black
# backgrounds.
#

Follow

Related: If you want to follow log files that are rotated, regularly or on reaching a certain size, use `tail -F` instead of `tail -f`. The difference is that -F tells `tail` to reopen the file if it's truncated or deleted/moved and recreated.

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!