📄 example06.172
字号:
!#/bin/ksh# This korn shell script will collect data for awk to use in # generating form letter(s). See above.print "Hello $LOGNAME. "print "This report is for the month and year:"cal | nawk 'NR==1{print $0}'if [[ -f data.form || -f formletter? ]]then rm data.form formletter? 2> /dev/nullfiinteger num=1while truedo print "Form letter #$num:" read project?"What is the name of the project? " read sender?"Who is the status report from? " read recipient?"Who is the status report to? " read due_date?"What is the completion date scheduled? " echo $project:$recipient:$sender:$due_date > data.form print -n "Do you wish to generate another form letter? " read answer if [[ "$answer" != [Yy]* ]] then break else nawk -f form.awk data.form > formletter$num fi (( num+=1 ))done nawk -f form.awk data.form > formletter$num
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -