linux运维经验分享
2017年7月19日
shell习题
No Comments
aming
用shell打印下面这句话中字母数小于6的单词。 Bash also interprets a number of multi-character options.
参考答案:
#!/bin/bash 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
#!/bin/bash
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
shell习题 – 查找字母数小于6的单词
2017年7月19日
shell习题
No Comments
aming
用shell打印下面这句话中字母数小于6的单词。
Bash also interprets a number of multi-character options.
参考答案:
shell习题