Remove blank lines ( new line ) with grep
echo -e "a\n\nb" | grep -v '^ *$'
or
grep -v '^[\s\t]*$' file.txt > new_file.txt
curl -s -o /dev/null -w "Conecction: %{time_connect}s | Start transfer: %{time_starttransfer}s | Total time: %{time_total}s\n" ...