You are viewing a single comment's thread. Return to all comments →
#!/bin/bash declare -a countries i=0 while IFS= read -r line do countries[$i]=$line ((i++)) done result=$(printf "%s\n" "${countries[@]}" | grep -vi "a") if [[ -z "$result" ]] then echo "" else echo "$result" fi
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 →