caseexample.sh

来自「linux下一些命令的c语言的实现」· Shell 代码 · 共 16 行

SH
16
字号
#!/bin/sh
echo –n "Do you want to continue this operation? [n]"
read yesno
case $yesno in
y | Y | Yes | yes)
	echo "system will continue this operation"
	;;
n | N | no | NO)
	echo "system will skip this operation"
	;;
*)
	echo "Incorrect input"
	exit 1
	;;
esac

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?