?? example02.06
字號(hào):
#!/bin/ksh # The Party Program--Invitations to friends from the "guest" file #guestfile=~/shell/guestsguestfile=./guestsif [[ ! -a "$guestfile" ]] then print "${guestfile##*/} non-existent" exit 1fiexport PLACE="Sarotini's"(( Time=$(date +%H) + 1 ))set -A foods cheese crackers shrimp drinks "hot dogs" sandwiches typeset -i n=0for person in $(< $guestfile) do if [[ $person = root ]] then continue else # Start of here document mail -v -s "Party" $person <<- FINIS Hi ${person}! Please join me at $PLACE for a party! Meet me at $Time o'clock. I'll bring the ice cream. Would you please bring ${foods[$n]} and anything else you would like to eat? Let me know if you can make it. Hope to see you soon. Your pal, ellie@`hostname` FINIS n=n+1 if (( ${#foods[*]} == $n )) then set -A foods cheese crackers shrimp drinks "hot dogs" sandwiches fi fidoneprint "Bye..."
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -