日期:2014-05-16 浏览次数:20855 次
#read -p "which files are what you want to compile? " case $# in "1") if [ "$1" == "remove" ]; then ls !(*.c|*.sh) | xargs rm if [ "$?" == "0" ]; then echo "remove successfully" else echo "remove failure" fi else gcc -o ${1%.c} $1 fi ;; "2") gcc -o ${1%.c} $1 gcc -o ${2%.c} $2 ;; *) echo "usage: $0 para1 [para2 ....]" ;; esac