📄 opts4
字号:
#!/bin/sh# Program opts4# Using getopts -- Fourth try --while getopts xyz: arguments 2>/dev/nulldo case $arguments in x) echo "you entered -x as an option.";; y) echo "you entered -y as an option.";; z) echo "you entered -z as an option." echo "\$OPTARG is $OPTARG.";; \?) echo "Usage opts4 [-xy] [-z argument]" exit 1;; esacdoneecho "The initial value of \$OPTIND is 1. The final value of \$OPTIND is $OPTIND. Since this reflects the number of the next command line argument,the number of arguments passed was `expr $OPTIND - 1`. "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -