We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Remove the First Capital Letter from Each Element
Remove the First Capital Letter from Each Element
Sort by
recency
|
173 Discussions
|
Please Login in order to post a comment
Maybe it is simplier
`
readarray arr for i in (echo res | tr "\n" " " done
`
readarray -t MYARR for i in "i]={MYARR[$i]} | sed 's/^[A-Z]/./') done
echo "${MYARR[*]}"
My solution: #!/bin/bash
array=()
while read -r entrada; do array+=("$entrada") done
echo ${array[@]/[a-zA-Z]/.}