Friday, December 19, 2025

Ask Guru Joe

 When I ask Gemini AI what the fun thing to do with linux terminal, it suggested me to install cowsay.  It generate an ASCII art of a cow that is quoting what you have written.  It is cute, useless and fun.  The Gemini also teach me how to combine cowsay with fortune, so the cow now can say random quote from famous people.  Okay, that's interesting... but not for me.  Can I have a flamingo or crocodile instead of cow? and FYI, there is a way to change the cow to another animal

Anyway, I like reading quotes, I like quoting quote for my teaching material but somehow I don't want it in my micro journal.  I need something stupid as a stress relief so...

Instead, I ask the Gemini to make something similar, about a character randomly answer yes or no.  Like the magic 8 ball or Ask Guru Joe.

Ask Guru Joe is a flash game I used to play with my sisters. It was very iconic and we love to ask stupid questions to Guru Joe.  Obviously it is not as wise as the Cowsay + Fortune, but I use it more. 

Ask Guru Joe the flash game

My version of Ask Guru Joe


Here's the script.  Again, the Gemini AI still remember that ask for crocodile image so it gives me crocodile on every shell script that I ask.

#!/bin/bash

# 1. Define the Answers (Add as many as you want!)
answers=(
"Yes, absolutely."
"My sources say NO."
"The stars are not aligned."
"Why are you asking me? I'm just a script."
"It is certain."
"Don't count on it."
"Ask me again after a coffee."
"404: Answer Not Found."
"Yes - but you won't like the outcome."
"Outlook good."
)

# 2. Pick a random answer
# We count how many answers there are, then pick a random number in that range.
num_answers=${#answers[@]}
random_index=$((RANDOM % num_answers))
selected_answer="${answers[$random_index]}"

# 3. The Visuals (The Crocodile Guru)
clear
echo -e "\e[1;35m"  # Pink Color
cat << "EOF"
                    .-._ _ _ _ _ _ _ _ _
         .-''-.__.-'00  '-' ' ' ' ' ' ' ' '-.
         '.___ '    .   .--_'-' '-' '-' _'-' '._
          V: V 'vv-'   '_   '.       .'  _..' '.'.
            '=.____.=_.--'   :_.__.__:_   '.   : :
                    (((____.-'        '-.  /   : :
          snd                         (((-'\ .' /
                                    _____..'  .'
                                   '-._____.-'      
EOF
echo -e "\e[0m"     # Reset Color
# 4. The Output
echo -e "\e[1;37m"  # Bold White
echo "Q: $@"
echo "---------------------------------"
echo "A: $selected_answer"
echo -e "\e[0m"


Save it as guru.sh 

Run chmod +x ~/guru.sh.

To ask a question to Guru Joe, type "~/guru.sh and ask any question"

change the underlined text to your question.


In my version, of course I change the ASCII art to an ASCII art of Guru Joe that I made by myself.  There are many ASCII art available but I don't think it is Guru Joe without Guru Joe.


No comments: