shell对文档里的多行数字求和:
/usr/bin/find $Dir/$b/* -type f -exec ls -l {} \; | awk -F[:" "]+ ‘{print $5}‘ > /log/aa.txt
Size=cat /log/aa.txt | awk ‘{sum+=$1} END {print sum}‘
echo $Size
原文地址:https://blog.51cto.com/yangzhiming/2359433
时间: 2024-10-10 19:54:35