10 lines
347 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
#Program:
# 判断用户的输入是确认还是拒绝
# History:
# 2024/07/14 LouisFonda<yigencong@yahoo.com>
read -p "请输入y/n" yn
[ "${yn}" == "y" -o "${yn}" == "Y" ] && echo "你确认了!" && exit 0
[ "${yn}" == "n" -o "${yn}" == "N" ] && echo "你拒绝了!" && exit 0
echo "我不理解你的输入!" && exit 0