From f855dc5ac98432ef4b126446c50a9737d98f0fb8 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Mon, 19 Jul 2021 13:36:58 +0200 Subject: always use read with -r --- update-openssh-known-hosts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update-openssh-known-hosts b/update-openssh-known-hosts index 325a997..9eee3ec 100755 --- a/update-openssh-known-hosts +++ b/update-openssh-known-hosts @@ -99,7 +99,7 @@ cd "${CACHEDIR}" find -mindepth 2 -maxdepth 2 -type f -name new -delete -run-parts --list "${CONFDIR}/sources/" | while read sourcefile; do +run-parts --list "${CONFDIR}/sources/" | while read -r sourcefile; do source=${sourcefile##*/} mkdir -p "${source}" download_source "${source}" "${sourcefile}" @@ -115,8 +115,8 @@ run-parts --list "${CONFDIR}/sources/" | while read sourcefile; do unset filter[$i] fi done - while read hostlist rest; do - IFS=, read -a hostarray <<<"$hostlist" + while read -r hostlist rest; do + IFS=, read -ra hostarray <<<"$hostlist" new_hostlist='' for host in "${hostarray[@]}"; do for rule in "${filter[@]}"; do -- cgit v1.2.3