example15.11
来自「UNIX[1].shell范例精解(第4版)_code」· 11 代码 · 共 25 行
11
25 行
#! /bin/kshprint "Do you want to see the menu?"read answerif [[ $answer = y ]]then cat << EOF <-- No space after user defined terminator 1) Steak and eggs 2) Fruit and yogurt 3) Pie and icecream EOF <-- User-defined terminator cannot have spaces surrounding it print "Pick one " read choice case "$choice" in 1) print "Cholesterol" ;; 2) print "Dieter" ;; 3) print "Sweet tooth" ;; esac else print "Later alligator!"fi
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?