example11.01

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

01
38
字号
# The profile that all logins get before using their own .profiletrap " " 2 3export LOGNAME PATH  # Initially set by /bin/loginif [ "$TERM" = " " ]then	if /bin/i386	then     # Set the terminal type		TERM=AT386	else		TERM=sun	fi	export TERMfi# Login and -su shells get /etc/profile services.# -rsh is given its environment in the .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     		# Display the message of the day		trap " " 2		/bin/mail -E		case $? in		0)	# Check for new mail			echo "You have new mail. "				;;		2)	echo "You have mail. "				;;		esac	fiesacumask 022trap 2 3

⌨️ 快捷键说明

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