#!/bin/sh
# Modified by Joe Smith to determine highest numbered quote automatically,
# and to not discriminate against higher numbered quotes.
#
a=`tail -1 ql.quote | cut -c1-5`	# Determine the highest numbered quote
y=`date +%y%m`			# Because $$ is a low number after a reboot
a=`expr \( 19$y + $$ \) % \( $a + 1 \)`
echo Quantum Leap quote \#$a:
expr "     $a" : '.*\(.....\)'  | \
join -t% -o 2.2 - ql.quote
exit 0
