#!/bin/bash
array=(I am oldboy teacher welcome to oldboy training class haha hehe)
funFirst(){
for word in ${array[*]}
do
if [ ${#word} -le 6 ];then
echo "$word"
fi
done
}
funFirst
[root@localhost date]# sh oldboy09.sh
I
am
oldboy
to
oldboy
class
haha
hehe