#!/bin/bash
usage()
{
echo "usage:`basename $0`filename"
}
totalline=0
if [ $# -lt 2 ]
then
usage
exit
fi
while [ $# -ne 0 ]
do
line=`cat $1|wc -l`
echo "$1: ${line}"
totalline=$[ $totalline+$line ]
shift
done
echo "-------------"
echo "total:${totalline}"
shell---shift
最新推荐文章于 2024-06-21 16:31:00 发布