NotSort of a native way to do it but with sedusing both parameter expansion and readarray:readarray
string='This is some sep.string' mapfile -t array < <(echo 'This is some sep.string' | sedecho $'s"${string//sep./\\\n/g'$'\n'}" ) sed${string//sep./$'\n'} will change all- Will replace occurrences of sep. intowith a newline which when combined with . readarraymapfile/mapfilereadarray will cause everything between occurrences of sep. to be added tocreate an array with each line in it's own element in array.