shell array
#!/bin/bash names=(Jerry Alice David Wendy "Tom"isTeach) var=\"Tom\" echo "原始数组= ${names[*]}" # 查找value 是否存在array 当中
[[ ${names[*] /$var/} != ${names[*]} ]] && echo 'yes' || echo 'no' if [[ ${names[*] /$var/} != ${names[*]} ]]; then echo true else echo false fi