ex32.sh
来自「BASH Shell 编程 经典教程 《高级SHELL脚本编程》中文版」· Shell 代码 · 共 25 行
SH
25 行
#!/bin/bashPS3='Choose your favorite vegetable: 'echochoice_of(){select vegetable# [in list]被忽略, 所以'select'使用传递给函数的参数.do echo echo "Your favorite veggie is $vegetable." echo "Yuck!" echo breakdone}choice_of beans rice carrots radishes tomatoes spinach# $1 $2 $3 $4 $5 $6# 传递给choice_of()的参数exit 0
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?