trapsig.ksh

来自「Solaris环境下Shell编程编程」· KSH 代码 · 共 23 行

KSH
23
字号
#!/bin/ksh# Script name: trapsig.kshtrap 'print "Control-C cannot terminate this script."' INTtrap 'print "Control-\ cannot terminate this script."' QUITtrap 'print "Control-Z cannot terminate this script."' TSTPprint "Enter any string (type 'dough' to exit)." while (( 1 ))do	print -n "Rolling..."	read string	if [[ "$string" = "dough" ]]	then		break	fidoneprint "Exiting normally"

⌨️ 快捷键说明

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