#! /bin/bash
arr=(hello world what is you name but ok)
for ((i=0;i<${#arr[*]};i++));do
if [ ${#arr[$i]} -le 6 ];then
echo "${arr[$i]}"
fi
done
转载于:https://blog.51cto.com/546136/2073380
#! /bin/bash
arr=(hello world what is you name but ok)
for ((i=0;i<${#arr[*]};i++));do
if [ ${#arr[$i]} -le 6 ];then
echo "${arr[$i]}"
fi
done
转载于:https://blog.51cto.com/546136/2073380