Use a specific character as a delimiter instead of a new line

read

read -d {{new_delimiter}} {{variable}}

click the source code to copy install read on any operating system with command-not-found.com