while IFS=$'\n' read -r -d ';' -a lines; do echo "Read group of lines:" printf ' - %s\n' "${lines[@]};"done
line2 line3; line4 line5 line6 line7;
Read group of lines: - line2 - line3; Read group of lines: - line4 - line5 - line6 - line7;
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!