标签:
查找:
条件判断
#! /bin/bash # declare -i line=0 while [ "$1" != "" ]; do if [ -e $1 ]; then echo "I m $1,and I am alive" line=`wc -l $1| cut -d" " -f1` let line=$[ $line + 1 ] echo "$line">>$1 echo "I am $1,and I am visited $line times" else touch $1 echo "fiel $1 created" fi shift done exit 0
标签:
原文地址:http://www.cnblogs.com/alexweng/p/4379673.html