opts3
来自「UNIX[1].shell范例精解(第4版)_code」· 代码 · 共 14 行
TXT
14 行
#!/bin/ksh# Program opts3# Using getopts -- Third try --while getopts :d optionsdo case $options in d) print -R "-d is the ON switch";; +d) print -R "+d is the OFF switch";; \?) print $OPTARG is not a valid option;; esacdone# Need the -R option with print or the shell tries to use -d as a# print option
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?