Skip to content

Instantly share code, notes, and snippets.

@mcnemesis
Created Jun 10, 2022
Embed
What would you like to do?
Have Fun in Bash Shell
# place the following into somewhere like /etc/bash.bashrc.local
# then import into your bash terminals via ~/.bashrc with:
# source /etc/bash.bashrc.local
function fun {
R=$(($RANDOM % 4))
if [[ $R -eq 1 ]]
then
sl
elif [[ $R -eq 2 ]]
then
echo "try 'asciiview PATH' to make some text art now"
elif [[ $R -eq 3 ]]
then
aafire
else
fortune | cowsay
fi
}
# then in any bash terminal, just have fun with invoking
fun
# to get some of the commands in fun working, consult this article:
# https://shambhavishandilya.medium.com/linux-commands-to-have-fun-on-terminal-2df8da483d59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment