I'm parsing a HTML page with a bash script and extracting (with grep and sed)
string number one
string number two
string number three
etc
as $str in a parsing loop followed by
array+=($str)
When the array is printed with
for each in "${array[@]}"
do
echo "$each"
done
I end up with
string
number
one
string
number
....
Clearly spaces are being used as a delimiter when adding a new element in the array, but I can't seem to work out how to pass the entire string as an element!