fix(quickemu): correct shellcheck SC2207 warnings

https://www.shellcheck.net/wiki/SC2207
This commit is contained in:
Martin Wimpress 2024-05-07 13:23:49 +01:00 committed by Martin Wimpress
parent 252f83c076
commit fe2dc839ed
1 changed files with 6 additions and 3 deletions

View File

@ -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