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
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
本文转自 chengxuyonghu 51CTO博客,原文链接:http://blog.51cto.com/6226001001/1587982,如需转载请自行联系原作者