发布于 2年前

实用Shell脚本:用shell打印示例语句中字母数小于6的单词

#示例语句:
#Bash also interprets a number of multi-character options.
#!/bin/bash
##############################################################
#shell打印示例语句中字母数小于6的单词
##############################################################
for s in Bash also interprets a number of multi-character options.
do
 n=`echo $s|wc -c`
 if [ $n -lt 6 ]
 then
 echo $s
 fi
done
©2020 edoou.com   京ICP备16001874号-3