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
|
177 Discussions
|
Please Login in order to post a comment
Great challenge on HackerRank! 🐧 Working with arrays in Bash really sharpens your scripting skills, and manipulating strings—like removing the first capital letter from each element—adds an extra layer of complexity. Mahadevbook777 ID
readarray list echo ${list[@]/[A-Z]/.}
readarray -t a arr={arr[@]}"
This function modifies a list by converting the first capital letter of each element to lowercase. It ensures uniform formatting while preserving the rest of the string. Ekbet16
Maybe it is simplier
`
readarray arr for i in (echo res | tr "\n" " " done
`