Sort by

recency

|

154 Discussions

|

  • + 0 comments

    This one line worked very well

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

  • + 0 comments

    This one line worked very well

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

  • + 0 comments

    a=($(cat))

    p=(${a[@]/* a */})

    echo ${p[@]}

    i set the input as array a

    then i edited array a into a new array p, removing all instances of "a", as well as the characters before and after "a". (remove the spaces in * a *)

    then i used echo to show me the new array p

    does this one make sense

  • + 0 comments

    This was my solution> #!/bin/bash

    i=10 i2=0 array1=()

    while ((i));do read dato array1=("dato") #echo "((i2+1)) done

    declare -a patter=(${array1[@]/[a-zA-Z]a/})

    echo ${patter[@]}

  • + 0 comments
    grep -vi a | awk '{
        if( $0 )
        print $0
        else
        print " "
    }'
    

    Mostly simple, but not the correct way