#!/bin/bash figlet_font=$( which figlet | sed -e 's/bin/share/') MAX=$(ls ${figlet_font}/*.flf | wc -l ) STOP=$( expr $RANDOM % $MAX ) i=0 for font in $(ls ${figlet_font}/*.flf ); do if [ $i -ge $STOP ] then figlet -f ${font%.*} LGTM break fi i=$(expr $i + 1 ) done