expr计算字符串长度
命令:expr length "quanzhiqinag"
#!/bin/bash for N in quan zhi qiang do if [ `expr length $N ` -le 4 ] then echo $N fi done
命令:expr length "quanzhiqinag"
#!/bin/bash for N in quan zhi qiang do if [ `expr length $N ` -le 4 ] then echo $N fi done