题解 | #打印字母数小于8的单词#
打印字母数小于8的单词
http://www.nowcoder.com/practice/bd5b5d4b93a04226a81afbabf0be797d
a=`cat nowcoder.txt `
for i in $a;do
#b=${#i}
#b=$(echo $i|wc -L)
#b=$(echo $i |awk -F "" '{print NF}')
#b=$(echo $i|awk '{print length($0) }')
b=$(expr length $i)
if [[ $b -lt 8 ]];then
echo $i
fi
done