I read the help read page, but still don\'t quite make sense. Don\'t know which option to use.
help read
How can I read N lines at a time using Bash?
Just use a for loop:
for
for i in $(seq 1 $N) ; do read line ; lines+=$line$'\n' ; done
In bash version 4, you can also use the mapfile command.
mapfile