sed -i "s/`echo -e \\\t`/,/g" 123456.txt
cat ./123456.txt| while read line
do
sd=`echo $line |awk -F, ‘{print (($4-$3))}‘ `
a=`echo $line |awk -F, ‘{print $1}‘ `
DAYLEN2=$(($(($sd))/86400))
echo $a "开通" $DAYLEN2 "天"
done
原文地址:http://6226001001.blog.51cto.com/9243584/1587982