You are viewing a single comment's thread. Return to all comments →
array=() while read line do array+=( ${line}) done arr=() for n in "${array[@]}" do if [[ $n != *"a"* ]] && [[ $n != *"A"* ]] then arr+=(${n}) fi done echo ${arr[@]}
Seems like cookies are disabled on this browser, please enable them to open this website
Filter an Array with Patterns
You are viewing a single comment's thread. Return to all comments →