⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mytar2

📁 Berkely的学生写的
💻
字号:
#!/bin/sh# Chapter 12 - Using options and arguments# The second version of the mytar script#!/bin/shUSAGE="Usage: `basename $0` [-c|-t] [files|directories]"if [ $# -lt 2 ] ; then     echo "$USAGE" ;     exit 1 ; ficase "$1" in    -t) shift ; TARGS="-tvf" ;        for i in "$@" ; do            if [ -f "$i" ] ; then                FILES=`tar $TARGS "$i" 2>/dev/null`                if [ $? -eq 0 ] ; then                    echo ; echo "$i" ; echo "$FILES"                else                    echo "ERROR: $i not a tar file."                fi            else                echo "ERROR: $i not a file."            fi        done         ;;    -c) shift ; TARGS="-cvf" ;        tar $TARGS archive.tar "$@"         ;;     *) echo "$USAGE"         exit 0         ;;esacexit $?

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -