Strip such lines starting with a #. Do not silently truncate lines if they have a # somewhere in between (like server=127.0.0.1#5353)

Signed-off-by: DL6ER <dl6er@dl6er.de>
pull/3892/head
DL6ER 3 years ago
parent a217c75134
commit 36937b1913
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

@ -977,7 +977,7 @@ make_array_from_file() {
# Otherwise, read the file line by line
while IFS= read -r line;do
# Othwerise, strip out comments and blank lines
new_line=$(echo "${line}" | sed -e 's/#.*$//' -e '/^$/d')
new_line=$(echo "${line}" | sed -e 's/^\s*#.*$//' -e '/^$/d')
# If the line still has content (a non-zero value)
if [[ -n "${new_line}" ]]; then
# Put it into the array

Loading…
Cancel
Save