Files
hornetsay/hornetsay
T
2026-09-17 09:06:47 +02:00

88 lines
1.9 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
STD=true
shaw=false
ghost=false
while getopts "atg" flag; do
case "$flag" in
a)
shaw=true
STD=false
;;
t)
text=$(date)
STD=false
;;
g)
ghost=true
;;
*)
text=" :( "
STD=false
ghost=false
shaw=false
;;
esac
done
if [ $shaw = true ]
then
if [ $ghost = true ]
then
text=" "
else
shaws=("SHAW!" "HEAGALE" "GIT GUD" "Fren." "HahAH" "EDINO!" "Mejina Fora.")
length=${#shaws[@]}
random_index=$(( RANDOM % length ))
text=${shaws[$random_index]}
STD=false
fi
fi
if [ $STD = true ]
then
read text
fi
line=""
for (( i=0; i<${#text}+4; i++ )); do
line="$line-"
done
if [ $ghost = true ]; then
echo $line
echo "| $text |"
echo $line
echo " \\/"
echo ⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡤⣄⠀⠀⠀⠀⠀⠀
echo ⣰⠻⣤⠀⠀⠀⠀⠀⠀⠻⡅⠘⡆⠀⣀⠀⢀⡀
echo ⡏⠀⡇⠀⠀⠀⠀⠀⠀⠀⡷⠀⡏⠀⢻⣿⣿⡟
echo ⢫⡀⠙⢦⠞⠋⠉⠉⠉⠉⠀⡼⠀⠀⠙⠋⠀⠀
echo ⠀⠑⢦⠀⢀⣤⡀⠀⢀⣤⡀⢻⠀⠀⠀⠀⠀⠀
echo ⠀⠀⠘⡄⠸⣿⡃⠀⠘⣿⠇⣸⠀⣏⡧⡆⠀⠀
echo ⠀⠀⠀⠘⠦⢄⣄⣤⣤⣴⠊⠁⣠⠛⠯⠽⠀⠀
echo ⠀⠀⠀⠀⢀⡾⢋⠥⣃⢼⡷⠋⠛⢧⠀⠀⠀⠀
echo ⠀⠀⠀⠀⠘⢻⣯⠟⢺⡟⠋⠀⠀⠀⠀⠀⠀⠀
echo ⠀⠀⠀⠀⠀⠀⠁⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀
else
echo $line
echo "| $text |"
echo $line
echo " \\/"
echo ⢀⡠⡲⠃⡰⣆⠀⠀
echo ⢀⡔⢡⠮⡠⠊⣰⠂⠀⠀
echo ⢀⠎⠠⡧⠊⠀⡠⠁⠀⠀⠀
echo ⡘⠀⠀⠀⠀⡔⠃⠀⠀⠀⠀
echo ⣯⣃⣾⡧⠊⠀⠀⠀⠀⠀⠀
echo ⢀⣿⣿⣥⠀⠀⠀⣀⣤⠾⠷
echo ⣴⣿⣿⣿⣿⣿⣶⡿⠋⠉⠀⠀
echo ⠈⣻⠿⣿⣿⣿⡿⠛⠃⠀⠀⠀⠀
echo ⣤⣔⠎⠇⠙⠀⢧⢸⠀⠀⠀⠀⠀⠀⠀
echo ⠐⠊⠁⠁⠀⠀⠀⠀⠸⢸⠀⠀⠀⠀⠀⠀⠀
fi