You are viewing a single comment's thread. Return to all comments →
readarray -t arr filtered_arr=() for element in "${arr[@]}"; do [[ "${element}" =~ [aA] ]] || filtered_arr+=("${element}") done echo ${filtered_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 →