Tag Archives: awk

[memo] 用 shell awk 加總 column

ls -l `find /mnt/tslog/archive/ -name "*20190[1..6]*" -type f` | awk '{sum += $5} END {print sum}'
160038650315

ls -l `find /mnt/tslog_bak -name "*20190[1..6]*" -type f` | awk '{sum += $5} END {print sum}'
160038650315

ls -l `find /mnt/tslog_backup2 -name "*20190[1..6]*" -type f` | awk '{sum += $5} END {print sum}'
160038650315