I haven’t really posted any recent code up here in a very, very long time…so I figured I’d post the little bash script I wrote for my mom last year for mother’s day.
#!/bin/sh#A script written by Shane Owens For his Mom#Based of Script written by Justin Kelzecho -n “Who are you!?:”read namewhile [ -z $name ]doecho -n “Please enter your name, MOM!:”read namedoneecho -n “Who’s the King of the World?:”read kingwhile [ -z $king ]doecho -n “Psst, you know it’s Shane; just type it in!:”read kingdonewhile [ : ]doclearcat << MENU!!HAPPY MOTHERS DAY!!>>>>>>> <<<<<<<“Yo, Yo, Yo $name!”Here are your choices.T: Says who’s the best mom ever!R: Says their birthday!A: Says who loves them!C: Says who is their most faaaaaavorite son!Y: Quit this script.MENUecho -n ‘Please state your choice from above:’read answhile [ -z $ans ]doecho -n “Please give a valid response!:”read ansdonecase $ans inT|t) echo -n Tracy N. OWENS! =Dread :;;R|r) echo -n The First of May!read :;;A|a) echo -n Everybody $name knows loves them! What are you talking about!?! But mostly Shane Owens!read :;;C|c) echo -n Def, Shane is the best son ever!
read :;;Y|y| exit|quit|Quit|Exit|end|End) echo “See you next time $name!!”break;;*) echo -n “Um..that’s not even a choice!! Lol:”sleep 2;;esacdone#!/bin/sh
#A script written by Shane Owens For his Mom
echo -n “Who are you!?
:”
read name
while [ -z $name ]
do
echo -n “Please enter your name, MOM!
:”
read name
done
echo -n “Who’s the King of the World?
:”
read king
while [ -z $king ]
do
echo -n “Psst, you know it’s Shane; just type it in!
:”
read king
done
while [ : ]
do
clear
cat << MENU
!!HAPPY MOTHERS DAY!!
>>>>>>> <<<<<<<
“Yo, Yo, Yo $name!”
Here are your choices.
T: Says who’s the best mom ever!
R: Says their birthday month!
A: Says who loves them!
C: Says who is their most faaaaaavorite son!
Y: Quit this script.
MENU
echo -n ‘Please state your choice from above:’
read ans
while [ -z $ans ]
do
echo -n “Please give a valid response!
:”
read ans
done
case $ans in
T|t) echo -n Tracy Owens! =D
read :
;;
R|r) echo -n Oh come on, you know this..May, silly.
read :
;;
A|a) echo -n Everybody $name knows loves them! What are you talking about!?! But mostly Shane!
read :
;;
C|c) echo -n Def, Shane is the best son ever!
![]()
read :
;;
Y|y| exit|quit|Quit|Exit|end|End) echo “See you next time $name!!”
break
;;
*) echo -n “Um..that’s not even a choice!! Lol
:”
sleep 2
;;
esac
done
So, I had some giggle farts last year and just wanted to share them with you all. :3
