You are viewing a single comment's thread. Return to all comments →
arr=() while IFS= read -r line do arr+=( $line) done
ans=() for var in {var:i:1}" == 'a' ]] || [[ "flag == 0 ] then ans+=( $var) fi done
for val in val " done
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 →
arr=() while IFS= read -r line do arr+=( $line) done
ans=() for var in {var:i:1}" == 'a' ]] || [[ "flag == 0 ] then ans+=( $var) fi done
for val in val " done