vim /root/bin/argsnum.sh
!/bin/bash
if [ $# -lt 1 ];then
echo "请输入至少一个参数:"
exit 0
fi
if [ $# -gt 1 ];then
SUM=grep "^$" $1 | wc -l
echo "空白行为:$SUM"
fi
vim /root/bin/argsnum.sh
if [ $# -lt 1 ];then
echo "请输入至少一个参数:"
exit 0
fi
if [ $# -gt 1 ];then
SUM=grep "^$" $1 | wc -l
echo "空白行为:$SUM"
fi