⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dbfunctions

📁 UNIX[1].shell范例精解(第4版)_code
💻
字号:
addon () {    # Function is named and defined in file .dbfunctions	while true	do		echo "Adding information "		echo "Type the full name of employee "		read name		echo "Type address for employee "		read address		echo "Type start date for employee (4/10/88 ) :"		read startdate    		echo $name:$address:$startdate		echo -n "Is this correct? "		read ans		case "$ans"  in		[Yy]*)		          echo "Adding info..."		          echo $name:$address:$startdate>>datafile		     sort -u datafile -o datafile		     echo -n "Do you want to go back to the main menu? "		     read ans		     if [ $ans = Y -o $ans = y ]		     then		          return        # Return to calling program		     else		          continue      # Go to the top of the loop		     fi		     ;;		*)		     echo "Do you want to try again? "		     read answer		case "$answer" in		[Yy]*) continue;;		*) exit;;		esac		     ;;	esacdone}	# End of function definition  

⌨️ 快捷键说明

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