From fe2dc839ede17f6bca0cd57bb88ef26e344baf59 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 7 May 2024 13:23:49 +0100 Subject: [PATCH] fix(quickemu): correct shellcheck SC2207 warnings https://www.shellcheck.net/wiki/SC2207 --- quickemu | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/quickemu b/quickemu index f8ebcc1..8812ca9 100755 --- a/quickemu +++ b/quickemu @@ -1487,9 +1487,12 @@ function parse_ports_from_file { local FILE="${VMDIR}/${VMNAME}.ports" # parse ports - local port_name=( $(cat "$FILE" | cut -d, -f1) ) - local port_number=( $(cat "$FILE" | cut -d, -f2) ) - local host_name=( $(cat "$FILE" | gawk 'FS="," {print $3,"."}') ) + # shellcheck disable=SC2207 + local port_name=( $(cat "${FILE}" | cut -d',' -f 1) ) + # shellcheck disable=SC2207 + local port_number=( $(cat "${FILE}" | cut -d',' -f 2) ) + # shellcheck disable=SC2207 + local host_name=( $(cat "${FILE}" | gawk 'FS="," {print $3,"."}') ) for ((i=0; i<${#port_name[@]}; i++)); do if [ "${port_name[$i]}" == "ssh" ]; then