vim /root/bin/sumfile.sh
!/bin/bash
A=ls -A /etc | wc -l
B=ls -A /var | wc -l
C=ls -A /usr | wc -l
SUM=$[$A+$B+$C]
echo "一级子目录和文件的总和为:$SUM"
vim /root/bin/sumfile.sh
A=ls -A /etc | wc -l
B=ls -A /var | wc -l
C=ls -A /usr | wc -l
SUM=$[$A+$B+$C]
echo "一级子目录和文件的总和为:$SUM"