esac.sh
主页面
#!/bin/sh
while :
do
echo "***********************************"
echo "* *"
echo "* 输入你想要点的妹妹:1-3号 *"
echo "* *"
echo "***********************************"
read num
case $num in
1)
clear
echo "***************************************"
echo "* *"
echo '* 1号一个白丝萝莉做的99乘法表 *'
echo "* *"
echo "***************************************"
. ./chengfabiao.sh
;;
2)
clear
echo "***************************************"
echo "* *"
echo '* 2号一个黑丝御姐做的计算器 *'
echo "* *"
echo "***************************************". ./jsq.sh
;;
3)
clear
echo "***************************************"
echo "* *"
echo '* 3号一个性感少妇画的图片 *'
echo "* *"
echo "***************************************". ./hua.sh
;;
*)
clear
echo "**************************************"
echo "* *"
echo "* 没有那个妹妹哦!请重新点 *"
echo "* *"
echo "**************************************"
continue
;;
esac
done
chengfabiao.sh
乘法表 (扣1和扣2都不显示除了12都可以)
#!/bin/sh
echo "++++++++++++++++++++++++++++++++++++"
echo "+ +"
echo "+ 欢迎哥哥 +"
echo "+ 妹妹今年刚满十八岁 +"
echo "+ +"
echo "++++++++++++++++++++++++++++++++++++"echo "------------------------------------"
echo "| |"
echo "| 哥哥,妹妹今天的白丝好看吗 | "
echo "| |"
echo "| |"
echo "-------------------------------------"
echo "-------------------------------------"
echo "| 提示 |"
echo "| |"
echo "| 回答正确才能看到乘法表 |"
echo "| |"
echo "| 扣1是好看, 扣2不好看 |"
echo "| |"
echo "—————————————————————————————————————"
read num
case $num in
1)
clear
echo "----------------------------"
echo "| |"
echo "| 变态!滚! |"
echo "| |"
echo "----------------------------"
;;
2)
clear
echo "-----------------------------"
echo "| |"
echo "| 真没品味!滚 |"
echo "| |"
echo "-----------------------------"
;;*)
clear
echo "------------------------------"
echo "| |"
echo "| |"
echo "| 哥哥你好冷漠 |"
echo "| 我好爱哦 |"
echo "| 那就给你看看好了 |"
echo "------------------------------"
for ((a=1;a<=9;a++))
do
for ((b=1;b<=$a;b++))
do
echo -n "$a*$b=$[ $a * $b ] "
doneecho ""
done
;;
esac
jsq.sh
计算器 (只有1才能进计算器)
#!/bin/sh
clear
echo
echo "++++++++++++++++++++++++++++++++++++++++++"
echo "+ +"
echo "+ 欢迎弟弟使用姐姐写的计算器哦! +"
echo "+ 输入1使用计算器 输入t重新 +"
echo "+ +"
echo "++++++++++++++++++++++++++++++++++++++++++"
read num
if [ $num == "1" ]
then
clear
echo "++++++++++++++++++++++++++++++++++++++++++"
echo "+ +"
echo "+ 欢迎弟弟使用姐姐写的计算器哦! +"
echo "+ 输入格式为:数字空格符号数字 +"
echo "+ +"
echo "++++++++++++++++++++++++++++++++++++++++++"while read num1 fuhao num2
do
if [ "$fuhao" == "+" -o "$fuhao" == "-" -o "$fuhao" == "/" -o "$fuhao" == "*" ]
then
val=$(echo "$num1 $fuhao $num2" | bc -l )
clear
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "+ +"
echo "+ 我思考一下哦 + "
echo "+ 我觉得${num1} ${fuhao} ${num2}的结果应该可能也许是 +"
echo "+ || +"
echo "+ \/ +"
echo "+ $val +"
echo "+ 弟弟上点有难度的 +"
echo "+ 不要怜惜我哦 +"
echo "+ +"
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"else
clear
echo "+++++++++++++++++++++++++++++++++++++"
echo "+ +"
echo "+ 这个姐姐暂时不可以回答你哦! +"
echo "+ +"
echo "+ +"
echo "+ 弟弟不可以乱弄哦 +"
echo "+ +"
echo "+ 请弟弟输入正常的格式 +"
echo "+ +"
echo "+++++++++++++++++++++++++++++++++++++"
fi
done
else
. ./esac.sh
fi
hua.sh
标签:shell,num,fuhao,clear,echo,99,sh,esac,乘法表 From: https://blog.csdn.net/weixin_67840381/article/details/140873072#!/bin/sh
while true
do
echo "=========================="
echo ""
echo "少妇正在洗澡,你先随便看看吧"
echo ""
echo "输入你想看的画,ctrl加c退出 输入t重新选 "
echo " "
echo "=========================="
read shuzi
case $shuzi in
1)
clear
echo "================"
echo "|| || "
echo "|| 直角三角形 || "
echo "|| ||"
echo "-----------------"
echo "|* |"
echo "|** | "
echo "|*** |"
echo "|**** |"
echo "|***** |"
echo "|****** |"
echo "----------------"
;;
2)
clear
echo "================================="
echo "|| ||"
echo "|| 两课树 || "
echo "|| ||"
echo "--------------------------------- "
echo "| |"
echo "| * * | "
echo "| *** *** | "
echo "| ***** ***** | "
echo "| **************** | "
echo "| || || | "
echo "----------------------------------"
;;
t)
clear
. ./esac.sh
;;
*)
clear
echo "=========================="
echo ""
echo "还没画呢 "
echo ""
echo " 小姐姐在洗澡了回来再画 "
echo ""
echo "========================="
;;
esac
done