显示文件行数
#!/bin/bash
read -p "Please assign a file:" FILE
let COUNT=0
if ls -dl $FILE | grep "^-.*" > /dev/null;then
while read LINE; do
let COUNT++
done < $FILE
echo $COUNT
else
echo "The \"FILE\" is not a common file. "
fi