#!/bin/bash
# this gift is for you
function heart {
clear
echo " ♡♡♡♡♡♡ ♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡ ♡♡♡♡♡♡♡♡♡♡♡"
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡"
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡ "
sleep 5
echo " ♡ "
}
function name {
clear
echo " This feature has been removed for a number of reasons "
echo "That's all"
}
function apple {
clear
echo "When you don't happy ,remember to go and eat an healthy apple then you'll be happppppppy"
echo "
** ********
** *********
** ********
**
****** ** ******
*********** *** ***********
*****************************
*******************************
*******************************
*******************************
*******************************
*******************************
*****************************
*****************************
***************************
***********************
******** *******
"
}
function stairs {
trap "echo 'Sorry! Can Not Stop!' " SIGINT
trap "echo 'Sorry! Can Not Stop!' " SIGTSTP
trap "echo 'Sorry! Can Not Stop!' " SIGQUIT
trap "echo 'Sorry! Can Not Stop!' " SIGKILL
trap "echo 'Sorry! Can Not Stop!' " SIGTERM
trap "echo 'Sorry! Can Not Stop!' " SIGSTOP
count=0
while [ $count -le 1000000 ]
do
if [ $count -eq 500000 ]
then
echo "**************************************************************"
echo " ♡♡♡♡♡♡ ♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡ ♡♡♡♡♡♡♡♡♡♡♡"
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡"
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡♡♡♡♡ "
sleep 1
echo " ♡♡♡ "
sleep 5
echo " ♡ "
echo "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
fi
echo "♡ ♡ ♡ ♡ "
echo " ♡ ♡ ♡ ♡ "
echo " ♡ ♡ ♡ ♡ "
echo " ♡ ♡ ♡ ♡ "
echo " ♡ ♡ ♡ ♡ "
echo " ♡ ♡ ♡ ♡ "
echo " ♡ ♡ ♡ ♡ "
echo " ♡ ♡ ♡ ♡ "
echo " ♡ ♡ ♡ ♡ "
echo " ♡ ♡ ♡ ♡ "
echo " ♡ ♡ ♡ ♡ "
echo " ♡ ♡ ♡ ♡ "
echo " ♡ ♡ ♡ ♡ "
echo " ♡ ♡ ♡ ♡ "
# echo "Loop #$count"
#sleep 1
count=$[$count+1]
done
}
function diskspace {
clear
df -k
}
function who_date {
clear
who
date
}
function factorial {
echo "$1"
if [ $1 -eq 1 ]
then
echo 1
else
local temp=$[ $1 -1 ]
local Result='factorial $temp'
echo $[ $Result * $1 ]
fi
}
function rand {
clear
min=1
max=$((50-1+1))
num=$(date +%s%N)
rand=$(($num%$max+$min))
echo "the lucky random number is $rand"
#echo "now you can enter another number to calculate it's factorial"
#read -p "Enter the number : " number
#factorial
# result=$(factorial $number)
# echo "The factorial of $number is : $result"
}
function message {
echo "you'd better do not try to enter the option of 8,the thread are not allow to stop
the only way is to close the terminal window "
}
function menu {
clear
echo
echo -e "\t\t\tA ******** Present ******** Menu\n"
echo -e "\t1. Diskspace "
echo -e "\t2. Who and date"
echo -e "\t3. Sample random number"
echo -e "\t4. Paint heart"
echo -e "\t5. Paint Your Name"
echo -e "\t6. When you don't happy"
echo -e "\t7. Warning message"
echo -e "\t8. Can not stop the stairs !!be careful!!"
echo -e "\t9. "
echo -en "\t\tEnter option: "
read -n 1 option
}
while [ 1 ]
do
menu
case $option in
0)
break ;;
1)
diskspace ;;
2)
who_date ;;
3)
rand ;;
4)
heart ;;
5)
name ;;
6)
apple ;;
7)
message ;;
8)
stairs ;;
*)
clear
echo "Sorry the option isn't there ,if you have some question please contact the Plastic_memory_Q"
;;
esac
echo -en "\n\n\t\t\tHit any key to continue"
read -n 1 line
done
clear
A Gift Form
最新推荐文章于 2024-05-04 22:44:30 发布