摘要:
用法示例 # 根据名称过滤 dewan Work ~/code/shell% pgrep qemu 3570191 dewan Work ~/code/shell% pgrep qemu -l 3570191 qemu-system-x86 dewan Work ~/code/shell% pgre 阅读全文
摘要:
下面这段代码中,变量cur表示这次循环所要处理的参数。如果没有触发前面的选项开关,第一个参数会被赋值给$DISK,第二个参数会赋值给$PART。 强无敌!~ while [ $# -ne 0 ]; do cur=${1} next=${2} case "$cur" in -h|--help) Usa 阅读全文