From c3ff4c33f589987c371de2cf05d4e614bccf1176 Mon Sep 17 00:00:00 2001 From: Philipp Fruck Date: Thu, 1 Feb 2024 21:43:56 +0000 Subject: [PATCH] assemble: Use read instead of cat (#1147) --- distrobox-assemble | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/distrobox-assemble b/distrobox-assemble index 02d99febaf..ae7e4172a2 100755 --- a/distrobox-assemble +++ b/distrobox-assemble @@ -423,10 +423,7 @@ parse_file() ( file="${1}" name="" - IFS=' - ' - # shellcheck disable=SC2013 - for line in $(cat "${file}"); do + while IFS="" read -r line || [ -n "$line" ]; do if [ -z "${line}" ]; then # blank line, skip continue @@ -473,7 +470,7 @@ parse_file() ( fi echo "${key}=${value}" >> "${tmpfile}" fi - done + done < "${file}" # # Execute now one last time for the last block run_distrobox "${name}" )