qfedu-linux-advanced-level/day1/d25.sh

10 lines
161 B
Bash
Raw Permalink Normal View History

2023-08-14 17:48:45 +08:00
#!/bin/bash
declare -i total=0
for line in `ls *.sh`
do
total+=`ls -l $line | awk '{print $5}'`
done
echo "所有 sh 文件的总大小为: $total 字节"