bunkdeck/proclaim

28 lines
612 B
Bash
Executable file

#!/bin/bash -e
# make username uppercase
username=$(echo "$USER" | tr '[:lower:]' '[:upper:]')
declare prompt
makeSlug () {
# make time and date
time=$(TZ=America/New_York date +%I:%M%p)
date=$(TZ=America/New_York date +%m/%d)
# make name/time string
prompt="${username}-${date}-${time}"
}
# enter bunkchat mode (clear the screen)
clear
while true
do
figlet -f future proclaim - bunkchat
echo "You may view old chat with 'scry', heathen."
echo "-------------------------------------------"
read -r -p "speak to the server: " text
makeSlug
echo "${prompt}: $text" >> /srv/bunkchat.txt
clear
done