Bash Script расширяйте строку на пространствах

readarray -t -d '' myStr < <(xargs printf '%s\0' <<<"$myStr")
Brian Patterson