example07.01

来自「UNIX[1].shell范例精解(第4版)_code」· 01 代码 · 共 40 行

01
40
字号
# The profile that all logins get before using their own .profiletrap " " 2 3export LOGNAME PATHif [ "$TERM" = " " ]then	if /bin/i386	then	     TERM=AT386	   # Sets the terminal	else	     TERM=sun	fi	export TERMfi# Login and -su shells get /etc/profile services.# -rsh is given its environment in its own .profile.	case "$0" in	-sh | -ksh | -jsh )		if [ ! -f .hushlogin ]		then			/usr/sbin/quota			# Allow the user to break the Message-Of-The-			# Day only.			trap "trap ' ' 2" 2			/bin/cat -s /etc/motd				# Message of the day displayed			trap " " 2			/bin/mail -E		 # Checks for new mail			case $? in 			0)				echo "You have new mail. "			;  ;			2) 				echo "You have mail. "				;;		   	esac		fi	esac	umask 022	trap 2 3	

⌨️ 快捷键说明

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