You are viewing a single comment's thread. Return to all 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[@]}
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 →
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[@]}