📄 ex-11-07_select.sh
字号:
#!/bin/ksh# Chapter 11 - The select loop# This example demonstrates using the ksh/bash select loop## The function CompConf has been added to demonstrate the# behavior of the loopCompConf() { echo $1 ; }PS3="Please make a selection => " ; export PS3select COMPONENT in comp1 comp2 comp3 all nonedo case $COMPONENT in comp1|comp2|comp3) CompConf $COMPONENT ;; all) CompConf comp1 CompConf comp2 CompConf comp3 ;; none) break ;; *) echo "ERROR: Invalid selection, $REPLY." ;; esacdone
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -