You are viewing a single comment's thread. Return to all comments →
using shell parameter expansion,
mapfile countries echo ${countries##*[Aa]*}
${parameter##pattern} deletes longest matching pattern.
${parameter##pattern}
If you need further information, here is bash reference manual. https://www.gnu.org/software/bash/manual/bash.html#Shell-Parameter-Expansion
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 →
using shell parameter expansion,
${parameter##pattern}
deletes longest matching pattern.If you need further information, here is bash reference manual. https://www.gnu.org/software/bash/manual/bash.html#Shell-Parameter-Expansion