Sort by

recency

|

158 Discussions

|

  • + 0 comments

    grep -vi '[a]' || echo

  • + 0 comments
    array=( `cat` )
    for i in ${!array[@]}; do
        if [[ ${array[$i]} =~ [aA] ]]; then
            unset array[$i]
        fi
    done
    
    echo ${array[@]}
    
  • + 0 comments
    readarray -t arr
    filtered_arr=()
    for element in "${arr[@]}"; do
        [[ "${element}" =~ [aA] ]] || filtered_arr+=("${element}")
    done
    echo ${filtered_arr[@]}
    
  • + 0 comments

    readarray -t MYARR for i in "i" =~ [Aa] ]]; then echo $i fi done

  • + 0 comments

    This one line worked very well

    sed -e '/a/d' -e '/A/d'