《PC数据采集》源代码

源代码在线查看: trap.err

软件大小: 74 K
上传用户: hxyw
关键词: PC数据 采集 源代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				#!/bin/ksh				# Script name: trap.err				# Example 10.131								# This trap checks for any command that exits with a non-zero 					# status and then prints the message.				trap 'print "You gave me a non-integer. Try again. "' ERR				typeset -i number   #Assignment to number must be integer				while true				do				    print -n "Enter an integer. " 				    read -r number 2> /dev/null				    if (( $? == 0 ))   # Was an integer read in? 				    then               # Was the exit status zero?					break 				    fi				done				trap - ERR   # Unset pseudo trap for ERR				n=$number												if grep ZOMBIE /etc/passwd > /dev/null 2>&1				then					:  				else				    print "\$n is $n. So long"				fi							

相关资源