bunkdeck/proclaim
2024-02-09 15:58:15 -05:00

29 lines
630 B
Bash
Executable file

#!/bin/bash -e
# make username uppercase
username=$(echo "$USER" | tr '[:lower:]' '[:upper:]')
timezone="America/New_York"
declare prompt
makeSlug () {
# make time and date
time=$(TZ=${timezone} date +%I:%M%p)
date=$(TZ=${timezone} 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