diff --git a/build_lofar.sh b/build_lofar.sh
index c61d39f82802b25a3fcf0a4b94d74c2a311662ad..0a11f9e36306c387cc651769dc1d297e908847da 100644
--- a/build_lofar.sh
+++ b/build_lofar.sh
@@ -154,13 +154,13 @@ EOT
       *\'*)
         echo "Really a command/argument with verbatim ' in it? $n" >&2
         # This might be broken.
-        printf '%s\\\n' "\"$n\""
+        printf '%s \\\n' "\"$n\""
       ;;
       *[^[:alnum:]_-/:+,.=]*|'')
-        printf '%s\\\n' "'$n'"
+        printf '%s \\\n' "'$n'"
       ;;
       *) # hopefully safe
-        printf '%s\\\n' "$n"
+        printf '%s \\\n' "$n"
       ;;
     esac
   done >> "$script"