#!/bin/bash
case $1 in
r) num=`grep "^r" $2|wc -l`;;//后面一定是两个;;
b) num=`grep "^b" $2|wc -l`;;
*) echo "we only find b&r";;
esac
echo $num
#!/bin/bash
case $1 in
r) num=`grep "^r" $2|wc -l`;;//后面一定是两个;;
b) num=`grep "^b" $2|wc -l`;;
*) echo "we only find b&r";;
esac
echo $num