ShellCheck - shell script analysis tool version: 0.11.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.mpUxlxND9X and /tmp/tmp.g6XvI15VRn Tree base: 624251d607e8 ("selftests: ovpn: add nftables config dependencies for test-mark") Now at: 129ff2068bac ("selftests: ovpn: fail notification check on mismatch") ====== Checking before the patch ====== Checking tools/testing/selftests/net/ovpn/common.sh - e3a67af2e113ee92dfb9cddd321874ac9c303e36744b0c6b1f1fc22173315989 In common.sh line 26: ip netns add peer${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns add peer"${1}" In common.sh line 32: if [ ${1} -eq 0 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "${1}" -eq 0 ]; then In common.sh line 34: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In common.sh line 35: ip link add veth${p} netns peer0 type veth peer name veth${p} netns peer${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link add veth"${p}" netns peer0 type veth peer name veth"${p}" netns peer"${p}" In common.sh line 37: ip -n peer0 addr add 10.10.${p}.1/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 addr add 10.10."${p}".1/24 dev veth"${p}" In common.sh line 38: ip -n peer0 addr add fd00:0:0:${p}::1/64 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 addr add fd00:0:0:"${p}"::1/64 dev veth"${p}" In common.sh line 39: ip -n peer0 link set veth${p} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 link set veth"${p}" up In common.sh line 41: ip -n peer${p} addr add 10.10.${p}.2/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr add 10.10."${p}".2/24 dev veth"${p}" In common.sh line 42: ip -n peer${p} addr add fd00:0:0:${p}::2/64 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr add fd00:0:0:"${p}"::2/64 dev veth"${p}" In common.sh line 43: ip -n peer${p} link set veth${p} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" link set veth"${p}" up In common.sh line 47: ip netns exec peer${1} ${OVPN_CLI} new_iface tun${1} $MODE ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_iface tun"${1}" $MODE In common.sh line 48: ip -n peer${1} addr add ${2} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" addr add "${2}" dev tun"${1}" In common.sh line 50: if [ ${1} -eq 1 -a -n "${LAN_IP}" ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. Did you mean: if [ "${1}" -eq 1 -a -n "${LAN_IP}" ]; then In common.sh line 51: ip -n peer${1} addr add ${LAN_IP} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" addr add ${LAN_IP} dev tun"${1}" In common.sh line 52: ip -n peer0 route add ${LAN_IP} via $(echo ${2} |sed -e s'!/.*!!') dev tun0 ^----------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-------------------------^ SC2001 (style): See if you can use ${variable//search/replace} instead. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 route add ${LAN_IP} via $(echo "${2}" |sed -e s'!/.*!!') dev tun0 In common.sh line 55: ip -n peer${1} link set mtu ${3} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" link set mtu "${3}" dev tun"${1}" In common.sh line 57: ip -n peer${1} link set tun${1} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" link set tun"${1}" up In common.sh line 81: PYTHONUNBUFFERED=1 ip netns exec peer${p} ${YNL_CLI} --family ovpn \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: PYTHONUNBUFFERED=1 ip netns exec peer"${p}" "${YNL_CLI}" --family ovpn \ In common.sh line 82: --subscribe peers --output-json --duration 40 > ${file} & ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: --subscribe peers --output-json --duration 40 > "${file}" & In common.sh line 92: if [ ${1} -eq 0 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "${1}" -eq 0 ]; then In common.sh line 93: ip netns exec peer0 ${OVPN_CLI} new_multi_peer tun0 1 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_multi_peer tun0 1 \ In common.sh line 94: ${M_ID} ${UDP_PEERS_FILE} ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${M_ID}" "${UDP_PEERS_FILE}" In common.sh line 96: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In common.sh line 97: ip netns exec peer0 ${OVPN_CLI} new_key tun0 ${p} 1 0 ${ALG} 0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_key tun0 "${p}" 1 0 "${ALG}" 0 \ In common.sh line 106: ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${UDP_PEERS_FILE}") In common.sh line 109: RADDR=$(awk "NR == ${1} {print \$3}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RADDR=$(awk "NR == ${1} {print \$3}" "${UDP_PEERS_FILE}") In common.sh line 110: RPORT=$(awk "NR == ${1} {print \$4}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RPORT=$(awk "NR == ${1} {print \$4}" "${UDP_PEERS_FILE}") In common.sh line 111: LPORT=$(awk "NR == ${1} {print \$6}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: LPORT=$(awk "NR == ${1} {print \$6}" "${UDP_PEERS_FILE}") In common.sh line 112: ip netns exec peer${1} ${OVPN_CLI} new_peer tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_peer tun"${1}" \ In common.sh line 113: ${PEER_ID} ${TX_ID} ${LPORT} ${RADDR} ${RPORT} ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${PEER_ID}" "${TX_ID}" "${LPORT}" "${RADDR}" "${RPORT}" In common.sh line 114: ip netns exec peer${1} ${OVPN_CLI} new_key tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_key tun"${1}" \ In common.sh line 115: ${PEER_ID} 1 0 ${ALG} 1 data64.key ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${PEER_ID}" 1 0 "${ALG}" 1 data64.key In common.sh line 118: if [ ${1} -eq 0 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "${1}" -eq 0 ]; then In common.sh line 119: (ip netns exec peer0 ${OVPN_CLI} listen tun0 1 ${M_ID} \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: (ip netns exec peer0 "${OVPN_CLI}" listen tun0 1 "${M_ID}" \ In common.sh line 120: ${TCP_PEERS_FILE} && { ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${TCP_PEERS_FILE}" && { In common.sh line 121: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In common.sh line 122: ip netns exec peer0 ${OVPN_CLI} new_key tun0 ${p} 1 0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_key tun0 "${p}" 1 0 \ In common.sh line 123: ${ALG} 0 data64.key ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${ALG}" 0 data64.key In common.sh line 133: ${TCP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${TCP_PEERS_FILE}") In common.sh line 136: ip netns exec peer${1} ${OVPN_CLI} connect tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" connect tun"${1}" \ In common.sh line 137: ${PEER_ID} ${TX_ID} 10.10.${1}.1 1 data64.key ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${PEER_ID}" "${TX_ID}" 10.10."${1}".1 1 data64.key In common.sh line 150: kill -TERM ${listener_pids[$1]} || true ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -TERM "${listener_pids[$1]}" || true In common.sh line 151: wait ${listener_pids[$1]} || true ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "${listener_pids[$1]}" || true In common.sh line 152: printf "Checking notifications for peer ${1}... " ^-- SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In common.sh line 153: if diff <(jq -s "${JQ_FILTER}" ${expected}) \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if diff <(jq -s "${JQ_FILTER}" "${expected}") \ In common.sh line 154: <(jq -s "${JQ_FILTER}" ${received}); then ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: <(jq -s "${JQ_FILTER}" "${received}"); then In common.sh line 158: rm -f ${received} || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm -f "${received}" || true In common.sh line 164: killall $(basename ${OVPN_CLI}) 2>/dev/null || true ^---------------------^ SC2046 (warning): Quote this to prevent word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: killall $(basename "${OVPN_CLI}") 2>/dev/null || true In common.sh line 168: ip -n peer${p} link set tun${p} down 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" link set tun"${p}" down 2>/dev/null || true In common.sh line 169: ip netns exec peer${p} ${OVPN_CLI} del_iface tun${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_iface tun"${p}" 2>/dev/null || true In common.sh line 172: ip -n peer0 link del veth${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 link del veth"${p}" 2>/dev/null || true In common.sh line 175: ip netns del peer${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del peer"${p}" 2>/dev/null || true In common.sh line 180: NUM_PEERS=${NUM_PEERS:-$(wc -l ${UDP_PEERS_FILE} | awk '{print $1}')} ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: NUM_PEERS=${NUM_PEERS:-$(wc -l "${UDP_PEERS_FILE}" | awk '{print $1}')} In common.sh line 182: NUM_PEERS=${NUM_PEERS:-$(wc -l ${TCP_PEERS_FILE} | awk '{print $1}')} ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: NUM_PEERS=${NUM_PEERS:-$(wc -l "${TCP_PEERS_FILE}" | awk '{print $1}')} For more information: https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q... https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf... ====== Checking the tree with the patch ====== Checking tools/testing/selftests/net/ovpn/common.sh - e3a67af2e113ee92dfb9cddd321874ac9c303e36744b0c6b1f1fc22173315989 In common.sh line 26: ip netns add peer${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns add peer"${1}" In common.sh line 32: if [ ${1} -eq 0 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "${1}" -eq 0 ]; then In common.sh line 34: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In common.sh line 35: ip link add veth${p} netns peer0 type veth peer name veth${p} netns peer${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip link add veth"${p}" netns peer0 type veth peer name veth"${p}" netns peer"${p}" In common.sh line 37: ip -n peer0 addr add 10.10.${p}.1/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 addr add 10.10."${p}".1/24 dev veth"${p}" In common.sh line 38: ip -n peer0 addr add fd00:0:0:${p}::1/64 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 addr add fd00:0:0:"${p}"::1/64 dev veth"${p}" In common.sh line 39: ip -n peer0 link set veth${p} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 link set veth"${p}" up In common.sh line 41: ip -n peer${p} addr add 10.10.${p}.2/24 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr add 10.10."${p}".2/24 dev veth"${p}" In common.sh line 42: ip -n peer${p} addr add fd00:0:0:${p}::2/64 dev veth${p} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" addr add fd00:0:0:"${p}"::2/64 dev veth"${p}" In common.sh line 43: ip -n peer${p} link set veth${p} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" link set veth"${p}" up In common.sh line 47: ip netns exec peer${1} ${OVPN_CLI} new_iface tun${1} $MODE ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_iface tun"${1}" $MODE In common.sh line 48: ip -n peer${1} addr add ${2} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" addr add "${2}" dev tun"${1}" In common.sh line 50: if [ ${1} -eq 1 -a -n "${LAN_IP}" ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. Did you mean: if [ "${1}" -eq 1 -a -n "${LAN_IP}" ]; then In common.sh line 51: ip -n peer${1} addr add ${LAN_IP} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" addr add ${LAN_IP} dev tun"${1}" In common.sh line 52: ip -n peer0 route add ${LAN_IP} via $(echo ${2} |sed -e s'!/.*!!') dev tun0 ^----------------------------^ SC2046 (warning): Quote this to prevent word splitting. ^-------------------------^ SC2001 (style): See if you can use ${variable//search/replace} instead. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 route add ${LAN_IP} via $(echo "${2}" |sed -e s'!/.*!!') dev tun0 In common.sh line 55: ip -n peer${1} link set mtu ${3} dev tun${1} ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" link set mtu "${3}" dev tun"${1}" In common.sh line 57: ip -n peer${1} link set tun${1} up ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${1}" link set tun"${1}" up In common.sh line 81: PYTHONUNBUFFERED=1 ip netns exec peer${p} ${YNL_CLI} --family ovpn \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: PYTHONUNBUFFERED=1 ip netns exec peer"${p}" "${YNL_CLI}" --family ovpn \ In common.sh line 82: --subscribe peers --output-json --duration 40 > ${file} & ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: --subscribe peers --output-json --duration 40 > "${file}" & In common.sh line 92: if [ ${1} -eq 0 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "${1}" -eq 0 ]; then In common.sh line 93: ip netns exec peer0 ${OVPN_CLI} new_multi_peer tun0 1 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_multi_peer tun0 1 \ In common.sh line 94: ${M_ID} ${UDP_PEERS_FILE} ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${M_ID}" "${UDP_PEERS_FILE}" In common.sh line 96: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In common.sh line 97: ip netns exec peer0 ${OVPN_CLI} new_key tun0 ${p} 1 0 ${ALG} 0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_key tun0 "${p}" 1 0 "${ALG}" 0 \ In common.sh line 106: ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${UDP_PEERS_FILE}") In common.sh line 109: RADDR=$(awk "NR == ${1} {print \$3}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RADDR=$(awk "NR == ${1} {print \$3}" "${UDP_PEERS_FILE}") In common.sh line 110: RPORT=$(awk "NR == ${1} {print \$4}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: RPORT=$(awk "NR == ${1} {print \$4}" "${UDP_PEERS_FILE}") In common.sh line 111: LPORT=$(awk "NR == ${1} {print \$6}" ${UDP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: LPORT=$(awk "NR == ${1} {print \$6}" "${UDP_PEERS_FILE}") In common.sh line 112: ip netns exec peer${1} ${OVPN_CLI} new_peer tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_peer tun"${1}" \ In common.sh line 113: ${PEER_ID} ${TX_ID} ${LPORT} ${RADDR} ${RPORT} ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${PEER_ID}" "${TX_ID}" "${LPORT}" "${RADDR}" "${RPORT}" In common.sh line 114: ip netns exec peer${1} ${OVPN_CLI} new_key tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" new_key tun"${1}" \ In common.sh line 115: ${PEER_ID} 1 0 ${ALG} 1 data64.key ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${PEER_ID}" 1 0 "${ALG}" 1 data64.key In common.sh line 118: if [ ${1} -eq 0 ]; then ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if [ "${1}" -eq 0 ]; then In common.sh line 119: (ip netns exec peer0 ${OVPN_CLI} listen tun0 1 ${M_ID} \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: (ip netns exec peer0 "${OVPN_CLI}" listen tun0 1 "${M_ID}" \ In common.sh line 120: ${TCP_PEERS_FILE} && { ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${TCP_PEERS_FILE}" && { In common.sh line 121: for p in $(seq 1 ${NUM_PEERS}); do ^----------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: for p in $(seq 1 "${NUM_PEERS}"); do In common.sh line 122: ip netns exec peer0 ${OVPN_CLI} new_key tun0 ${p} 1 0 \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer0 "${OVPN_CLI}" new_key tun0 "${p}" 1 0 \ In common.sh line 123: ${ALG} 0 data64.key ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${ALG}" 0 data64.key In common.sh line 133: ${TCP_PEERS_FILE}) ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${TCP_PEERS_FILE}") In common.sh line 136: ip netns exec peer${1} ${OVPN_CLI} connect tun${1} \ ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${1}" "${OVPN_CLI}" connect tun"${1}" \ In common.sh line 137: ${PEER_ID} ${TX_ID} 10.10.${1}.1 1 data64.key ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "${PEER_ID}" "${TX_ID}" 10.10."${1}".1 1 data64.key In common.sh line 154: kill -TERM ${listener_pids[$1]} || true ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: kill -TERM "${listener_pids[$1]}" || true In common.sh line 155: wait ${listener_pids[$1]} || true ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: wait "${listener_pids[$1]}" || true In common.sh line 156: printf "Checking notifications for peer ${1}... " ^-- SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In common.sh line 157: if diff <(jq -s "${JQ_FILTER}" ${expected}) \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: if diff <(jq -s "${JQ_FILTER}" "${expected}") \ In common.sh line 158: <(jq -s "${JQ_FILTER}" ${received}) \ ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: <(jq -s "${JQ_FILTER}" "${received}") \ In common.sh line 168: rm -f ${received} || true ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: rm -f "${received}" || true In common.sh line 176: killall $(basename ${OVPN_CLI}) 2>/dev/null || true ^---------------------^ SC2046 (warning): Quote this to prevent word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: killall $(basename "${OVPN_CLI}") 2>/dev/null || true In common.sh line 180: ip -n peer${p} link set tun${p} down 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer"${p}" link set tun"${p}" down 2>/dev/null || true In common.sh line 181: ip netns exec peer${p} ${OVPN_CLI} del_iface tun${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec peer"${p}" "${OVPN_CLI}" del_iface tun"${p}" 2>/dev/null || true In common.sh line 184: ip -n peer0 link del veth${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip -n peer0 link del veth"${p}" 2>/dev/null || true In common.sh line 187: ip netns del peer${p} 2>/dev/null || true ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns del peer"${p}" 2>/dev/null || true In common.sh line 192: NUM_PEERS=${NUM_PEERS:-$(wc -l ${UDP_PEERS_FILE} | awk '{print $1}')} ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: NUM_PEERS=${NUM_PEERS:-$(wc -l "${UDP_PEERS_FILE}" | awk '{print $1}')} In common.sh line 194: NUM_PEERS=${NUM_PEERS:-$(wc -l ${TCP_PEERS_FILE} | awk '{print $1}')} ^---------------^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: NUM_PEERS=${NUM_PEERS:-$(wc -l "${TCP_PEERS_FILE}" | awk '{print $1}')} For more information: https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q... https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf...