Hello Janis,
19 Apr 18 07:45 at you wrote to me:
Neat :) Hmm... wish I could think of way to do scrabble for Linux
that way - HEH... you probably could with premade screens or something
:) :) ah, have to drink some coffee and then actually think about it
:)
The "answers" themselves are in a separate text file but here's the script:
=== Cut ===
#!/bin/bash
FILE=answers.dat
if [ ! -f "$FILE" ]
then
echo "ANSWERS.DAT not found!"
echo "Program aborting."
exit 1
fi
clear
# Echoed in light green
echo -e "\e[92mThe Magic Oracle/BASH"
echo -e "\e[36mWritten by and (C)2017 Sean Dennis."
echo
echo -e "\e[96mWhat is your question for the Oracle?\e[37m"
read QUESTION
echo
echo -e "\e[92mYour question was:"
echo -e "\e[37m$QUESTION"
echo
echo -e "\e[95mAfter consulting the Oracle, his answer is...\e[33m"
# Pick and display a random line in ANSWERS.DAT.
sort --random-sort $FILE | head -n 1
echo -e "\e[39m"
=== Cut ===
That's all, folks!
Later,
Sean
... My other computer is a piece of junk.
--- GoldED+/LNX 1.1.5-b20170303
* Origin: Outpost BBS * Limestone, TN, USA (1:18/200)