shell计算
{{uploading-image-465431.png(uploading...)}}






let命令运算
let命令的执行,效果等同于双小括号
但是,双括号效率更高(())


expr命令
expr --help


expr 模式匹配




查找小于5的字符

[root@localhost mnt]# ./check_zifu.sh
I
am
you
to
[root@localhost mnt]# cat check_zifu.sh
#!/bin/bash
#利用for循环
for str1 in I am jay,i teach you to lenrn singing
do
if [ `expr length $str1` -lt 5 ]
then
echo $str1
fi
done
浙公网安备 33010602011771号