I have a pretty important question, I have been a fan of the stegosaurus of cowsay(the package) that reads fortunes, input, etc.. So naturally it was of great importance to me to have this majestic creature tell me what day it is every day. I made the following script to do so using user input:
#!/bin/bash selection= until [ "$selection" = "0" ]; do echo "" echo "PROGRAM MENU" echo "1 - It's Monday!" echo "2 - It's Tuesday!" echo "3 - It's Wednesday!" echo "4 - It's Thursday!" echo "5 - It's Friday!" echo "6 - Custom input" echo "7 - Exit" echo "" echo -n "Enter selection: " read selection echo "" case $selection in 1 ) cowsay -f stegosaurus "It's Monday!" exit ;; 2 ) cowsay -f stegosaurus "It's Tuesday!" exit ;; 3 ) cowsay -f stegosaurus "It's Wednesday!" exit ;; 4 ) cowsay -f stegosaurus "It's Thursday!" exit ;; 5 ) cowsay -f stegosaurus "It's Friday!" exit ;; 6 ) echo -n "custom input > " read custom cowsay -f stegosaurus "$custom" exit ;; 7 ) exit ;; * ) cowsay -f stegosaurus "Guess what day it is?" exit ;; esac done However, this was one of my first scripts on a linux distrobution and I'm ready to enhance my creation by making it automatically update with the current day (Maybe even hour if I can). However, I haven't been able to do this so far.. Can anyone please help me or point me in the right direction?
I'd be incredibly grateful for any advice, thanks very much in advance!
man dateselectcommand, which you are reimplementing.