ShellCheck - shell script analysis tool version: 0.10.0 license: GNU General Public License, version 3 website: https://www.shellcheck.net Redirect to /tmp/tmp.R5PA9Vl88s and /tmp/tmp.AcWMYV9Lq2 Tree base: 5b1051db3a3c ("selftests: traceroute: Return correct value on failure") Now at: 080a012807db ("selftests: traceroute: Use require_command()") ====== Checking before the patch ====== Checking tools/testing/selftests/net/traceroute.sh - 96f45684d7c39babc9a5892e4e62a2e0ebd9efbe5b2bc580cfa9d8bafa242dcc In traceroute.sh line 25: printf " COMMAND: $cmd\n" ^-------------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In traceroute.sh line 28: out=$(eval ip netns exec ${ns} ${cmd} 2>&1) ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$(eval ip netns exec "${ns}" "${cmd}" 2>&1) In traceroute.sh line 30: if [ "$VERBOSE" = "1" -a -n "$out" ]; then ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In traceroute.sh line 52: ip netns exec ${ns} ip addr add dev lo ${addr} ^---^ 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 "${ns}" ip addr add dev lo "${addr}" In traceroute.sh line 55: ip netns exec ${ns} ip -6 addr add dev lo ${addr6} ^---^ 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 "${ns}" ip -6 addr add dev lo "${addr6}" In traceroute.sh line 58: ip netns exec ${ns} ip ro add unreachable default metric 8192 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" ip ro add unreachable default metric 8192 In traceroute.sh line 59: ip netns exec ${ns} ip -6 ro add unreachable default metric 8192 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" ip -6 ro add unreachable default metric 8192 In traceroute.sh line 61: ip netns exec ${ns} sysctl -qw net.ipv4.ip_forward=1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" sysctl -qw net.ipv4.ip_forward=1 In traceroute.sh line 62: ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1 In traceroute.sh line 63: ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.forwarding=1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" sysctl -qw net.ipv6.conf.all.forwarding=1 In traceroute.sh line 64: ip netns exec ${ns} sysctl -qw net.ipv6.conf.default.forwarding=1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" sysctl -qw net.ipv6.conf.default.forwarding=1 In traceroute.sh line 65: ip netns exec ${ns} sysctl -qw net.ipv6.conf.default.accept_dad=0 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" sysctl -qw net.ipv6.conf.default.accept_dad=0 In traceroute.sh line 80: ip netns exec ${ns1} ip li add ${ns1_dev} type veth peer name tmp ^----^ 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 "${ns1}" ip li add "${ns1_dev}" type veth peer name tmp In traceroute.sh line 81: ip netns exec ${ns1} ip li set ${ns1_dev} 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 netns exec "${ns1}" ip li set "${ns1_dev}" up In traceroute.sh line 82: ip netns exec ${ns1} ip li set tmp netns ${ns2} name ${ns2_dev} ^----^ 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 "${ns1}" ip li set tmp netns "${ns2}" name "${ns2_dev}" In traceroute.sh line 83: ip netns exec ${ns2} ip li set ${ns2_dev} 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 netns exec "${ns2}" ip li set "${ns2_dev}" up In traceroute.sh line 86: ip netns exec ${ns1} ip addr add dev ${ns1_dev} ${ns1_addr} ^----^ 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 "${ns1}" ip addr add dev "${ns1_dev}" "${ns1_addr}" In traceroute.sh line 90: ip netns exec ${ns2} ip addr add dev ${ns2_dev} ${ns2_addr} ^----^ 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 "${ns2}" ip addr add dev "${ns2_dev}" "${ns2_addr}" In traceroute.sh line 94: ip netns exec ${ns1} ip addr add dev ${ns1_dev} ${ns1_addr6} ^----^ 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 "${ns1}" ip addr add dev "${ns1_dev}" "${ns1_addr6}" In traceroute.sh line 98: ip netns exec ${ns2} ip addr add dev ${ns2_dev} ${ns2_addr6} ^----^ 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 "${ns2}" ip addr add dev "${ns2_dev}" "${ns2_addr6}" In traceroute.sh line 139: cleanup_ns $h1 $h2 $r1 $r2 ^-^ SC2154 (warning): h1 is referenced but not assigned. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2154 (warning): h2 is referenced but not assigned. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2154 (warning): r1 is referenced but not assigned. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2154 (warning): r2 is referenced but not assigned. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cleanup_ns "$h1" "$h2" "$r1" "$r2" In traceroute.sh line 151: create_ns $h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$h1" In traceroute.sh line 152: create_ns $h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$h2" In traceroute.sh line 153: create_ns $r1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$r1" In traceroute.sh line 154: create_ns $r2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$r2" In traceroute.sh line 157: connect_ns $r2 eth3 - 2000:103::2/64 $h2 eth3 - 2000:103::4/64 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: connect_ns "$r2" eth3 - 2000:103::2/64 "$h2" eth3 - 2000:103::4/64 In traceroute.sh line 158: ip netns exec $h2 ip route add default via 2000:103::2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$h2" ip route add default via 2000:103::2 In traceroute.sh line 161: connect_ns $r1 eth2 - 2000:102::1/64 $r2 eth2 - 2000:102::2/64 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: connect_ns "$r1" eth2 - 2000:102::1/64 "$r2" eth2 - 2000:102::2/64 In traceroute.sh line 162: ip netns exec $r1 ip route add default via 2000:102::2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$r1" ip route add default via 2000:102::2 In traceroute.sh line 165: ip netns exec $r1 ip link add name ${brdev} type bridge ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$r1" ip link add name ${brdev} type bridge In traceroute.sh line 166: ip netns exec $r1 ip link set ${brdev} up ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$r1" ip link set ${brdev} up In traceroute.sh line 167: ip netns exec $r1 ip addr add 2000:101::1/64 dev ${brdev} ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$r1" ip addr add 2000:101::1/64 dev ${brdev} In traceroute.sh line 169: connect_ns $h1 eth0 - 2000:101::3/64 $r1 eth0 - - ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: connect_ns "$h1" eth0 - 2000:101::3/64 "$r1" eth0 - - In traceroute.sh line 170: ip netns exec $r1 ip link set dev eth0 master ${brdev} ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$r1" ip link set dev eth0 master ${brdev} In traceroute.sh line 171: ip netns exec $h1 ip route add default via 2000:101::1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$h1" ip route add default via 2000:101::1 In traceroute.sh line 173: connect_ns $r2 eth1 - 2000:101::2/64 $r1 eth1 - - ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: connect_ns "$r2" eth1 - 2000:101::2/64 "$r1" eth1 - - In traceroute.sh line 174: ip netns exec $r1 ip link set dev eth1 master ${brdev} ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$r1" ip link set dev eth1 master ${brdev} In traceroute.sh line 177: ip netns exec $h1 ping6 -c5 2000:103::4 >/dev/null 2>&1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$h1" ping6 -c5 2000:103::4 >/dev/null 2>&1 In traceroute.sh line 194: run_cmd $h1 "traceroute6 2000:103::4 | grep -q 2000:102::2" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: run_cmd "$h1" "traceroute6 2000:103::4 | grep -q 2000:102::2" In traceroute.sh line 218: cleanup_ns $h1 $h2 $router ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2154 (warning): router is referenced but not assigned. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cleanup_ns "$h1" "$h2" "$router" In traceroute.sh line 228: create_ns $h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$h1" In traceroute.sh line 229: create_ns $h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$h2" In traceroute.sh line 230: create_ns $router ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$router" In traceroute.sh line 232: connect_ns $h1 eth0 1.0.1.3/24 - \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: connect_ns "$h1" eth0 1.0.1.3/24 - \ In traceroute.sh line 233: $router eth1 1.0.3.1/24 - ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$router" eth1 1.0.3.1/24 - In traceroute.sh line 234: ip netns exec $h1 ip route add default via 1.0.1.1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$h1" ip route add default via 1.0.1.1 In traceroute.sh line 236: ip netns exec $router ip addr add 1.0.1.1/24 dev eth1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$router" ip addr add 1.0.1.1/24 dev eth1 In traceroute.sh line 237: ip netns exec $router sysctl -qw \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$router" sysctl -qw \ In traceroute.sh line 240: connect_ns $h2 eth0 1.0.2.4/24 - \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: connect_ns "$h2" eth0 1.0.2.4/24 - \ In traceroute.sh line 241: $router eth2 1.0.2.1/24 - ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$router" eth2 1.0.2.1/24 - In traceroute.sh line 242: ip netns exec $h2 ip route add default via 1.0.2.1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$h2" ip route add default via 1.0.2.1 In traceroute.sh line 245: ip netns exec $h1 ping -c5 1.0.2.4 >/dev/null 2>&1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$h1" ping -c5 1.0.2.4 >/dev/null 2>&1 In traceroute.sh line 262: run_cmd $h1 "traceroute 1.0.2.4 | grep -q 1.0.1.1" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: run_cmd "$h1" "traceroute 1.0.2.4 | grep -q 1.0.1.1" In traceroute.sh line 285: v) VERBOSE=$(($VERBOSE + 1));; ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. For more information: https://www.shellcheck.net/wiki/SC2154 -- h1 is referenced but not assigned. 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/traceroute.sh - 96f45684d7c39babc9a5892e4e62a2e0ebd9efbe5b2bc580cfa9d8bafa242dcc In traceroute.sh line 25: printf " COMMAND: $cmd\n" ^-------------------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". In traceroute.sh line 28: out=$(eval ip netns exec ${ns} ${cmd} 2>&1) ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. ^----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: out=$(eval ip netns exec "${ns}" "${cmd}" 2>&1) In traceroute.sh line 30: if [ "$VERBOSE" = "1" -a -n "$out" ]; then ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In traceroute.sh line 52: ip netns exec ${ns} ip addr add dev lo ${addr} ^---^ 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 "${ns}" ip addr add dev lo "${addr}" In traceroute.sh line 55: ip netns exec ${ns} ip -6 addr add dev lo ${addr6} ^---^ 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 "${ns}" ip -6 addr add dev lo "${addr6}" In traceroute.sh line 58: ip netns exec ${ns} ip ro add unreachable default metric 8192 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" ip ro add unreachable default metric 8192 In traceroute.sh line 59: ip netns exec ${ns} ip -6 ro add unreachable default metric 8192 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" ip -6 ro add unreachable default metric 8192 In traceroute.sh line 61: ip netns exec ${ns} sysctl -qw net.ipv4.ip_forward=1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" sysctl -qw net.ipv4.ip_forward=1 In traceroute.sh line 62: ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1 In traceroute.sh line 63: ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.forwarding=1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" sysctl -qw net.ipv6.conf.all.forwarding=1 In traceroute.sh line 64: ip netns exec ${ns} sysctl -qw net.ipv6.conf.default.forwarding=1 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" sysctl -qw net.ipv6.conf.default.forwarding=1 In traceroute.sh line 65: ip netns exec ${ns} sysctl -qw net.ipv6.conf.default.accept_dad=0 ^---^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "${ns}" sysctl -qw net.ipv6.conf.default.accept_dad=0 In traceroute.sh line 80: ip netns exec ${ns1} ip li add ${ns1_dev} type veth peer name tmp ^----^ 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 "${ns1}" ip li add "${ns1_dev}" type veth peer name tmp In traceroute.sh line 81: ip netns exec ${ns1} ip li set ${ns1_dev} 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 netns exec "${ns1}" ip li set "${ns1_dev}" up In traceroute.sh line 82: ip netns exec ${ns1} ip li set tmp netns ${ns2} name ${ns2_dev} ^----^ 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 "${ns1}" ip li set tmp netns "${ns2}" name "${ns2_dev}" In traceroute.sh line 83: ip netns exec ${ns2} ip li set ${ns2_dev} 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 netns exec "${ns2}" ip li set "${ns2_dev}" up In traceroute.sh line 86: ip netns exec ${ns1} ip addr add dev ${ns1_dev} ${ns1_addr} ^----^ 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 "${ns1}" ip addr add dev "${ns1_dev}" "${ns1_addr}" In traceroute.sh line 90: ip netns exec ${ns2} ip addr add dev ${ns2_dev} ${ns2_addr} ^----^ 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 "${ns2}" ip addr add dev "${ns2_dev}" "${ns2_addr}" In traceroute.sh line 94: ip netns exec ${ns1} ip addr add dev ${ns1_dev} ${ns1_addr6} ^----^ 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 "${ns1}" ip addr add dev "${ns1_dev}" "${ns1_addr6}" In traceroute.sh line 98: ip netns exec ${ns2} ip addr add dev ${ns2_dev} ${ns2_addr6} ^----^ 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 "${ns2}" ip addr add dev "${ns2_dev}" "${ns2_addr6}" In traceroute.sh line 139: cleanup_ns $h1 $h2 $r1 $r2 ^-^ SC2154 (warning): h1 is referenced but not assigned. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2154 (warning): h2 is referenced but not assigned. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2154 (warning): r1 is referenced but not assigned. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2154 (warning): r2 is referenced but not assigned. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cleanup_ns "$h1" "$h2" "$r1" "$r2" In traceroute.sh line 151: create_ns $h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$h1" In traceroute.sh line 152: create_ns $h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$h2" In traceroute.sh line 153: create_ns $r1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$r1" In traceroute.sh line 154: create_ns $r2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$r2" In traceroute.sh line 157: connect_ns $r2 eth3 - 2000:103::2/64 $h2 eth3 - 2000:103::4/64 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: connect_ns "$r2" eth3 - 2000:103::2/64 "$h2" eth3 - 2000:103::4/64 In traceroute.sh line 158: ip netns exec $h2 ip route add default via 2000:103::2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$h2" ip route add default via 2000:103::2 In traceroute.sh line 161: connect_ns $r1 eth2 - 2000:102::1/64 $r2 eth2 - 2000:102::2/64 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: connect_ns "$r1" eth2 - 2000:102::1/64 "$r2" eth2 - 2000:102::2/64 In traceroute.sh line 162: ip netns exec $r1 ip route add default via 2000:102::2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$r1" ip route add default via 2000:102::2 In traceroute.sh line 165: ip netns exec $r1 ip link add name ${brdev} type bridge ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$r1" ip link add name ${brdev} type bridge In traceroute.sh line 166: ip netns exec $r1 ip link set ${brdev} up ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$r1" ip link set ${brdev} up In traceroute.sh line 167: ip netns exec $r1 ip addr add 2000:101::1/64 dev ${brdev} ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$r1" ip addr add 2000:101::1/64 dev ${brdev} In traceroute.sh line 169: connect_ns $h1 eth0 - 2000:101::3/64 $r1 eth0 - - ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: connect_ns "$h1" eth0 - 2000:101::3/64 "$r1" eth0 - - In traceroute.sh line 170: ip netns exec $r1 ip link set dev eth0 master ${brdev} ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$r1" ip link set dev eth0 master ${brdev} In traceroute.sh line 171: ip netns exec $h1 ip route add default via 2000:101::1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$h1" ip route add default via 2000:101::1 In traceroute.sh line 173: connect_ns $r2 eth1 - 2000:101::2/64 $r1 eth1 - - ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: connect_ns "$r2" eth1 - 2000:101::2/64 "$r1" eth1 - - In traceroute.sh line 174: ip netns exec $r1 ip link set dev eth1 master ${brdev} ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$r1" ip link set dev eth1 master ${brdev} In traceroute.sh line 177: ip netns exec $h1 ping6 -c5 2000:103::4 >/dev/null 2>&1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$h1" ping6 -c5 2000:103::4 >/dev/null 2>&1 In traceroute.sh line 189: run_cmd $h1 "traceroute6 2000:103::4 | grep -q 2000:102::2" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: run_cmd "$h1" "traceroute6 2000:103::4 | grep -q 2000:102::2" In traceroute.sh line 213: cleanup_ns $h1 $h2 $router ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. ^-----^ SC2154 (warning): router is referenced but not assigned. ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: cleanup_ns "$h1" "$h2" "$router" In traceroute.sh line 223: create_ns $h1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$h1" In traceroute.sh line 224: create_ns $h2 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$h2" In traceroute.sh line 225: create_ns $router ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: create_ns "$router" In traceroute.sh line 227: connect_ns $h1 eth0 1.0.1.3/24 - \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: connect_ns "$h1" eth0 1.0.1.3/24 - \ In traceroute.sh line 228: $router eth1 1.0.3.1/24 - ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$router" eth1 1.0.3.1/24 - In traceroute.sh line 229: ip netns exec $h1 ip route add default via 1.0.1.1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$h1" ip route add default via 1.0.1.1 In traceroute.sh line 231: ip netns exec $router ip addr add 1.0.1.1/24 dev eth1 ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$router" ip addr add 1.0.1.1/24 dev eth1 In traceroute.sh line 232: ip netns exec $router sysctl -qw \ ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$router" sysctl -qw \ In traceroute.sh line 235: connect_ns $h2 eth0 1.0.2.4/24 - \ ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: connect_ns "$h2" eth0 1.0.2.4/24 - \ In traceroute.sh line 236: $router eth2 1.0.2.1/24 - ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: "$router" eth2 1.0.2.1/24 - In traceroute.sh line 237: ip netns exec $h2 ip route add default via 1.0.2.1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$h2" ip route add default via 1.0.2.1 In traceroute.sh line 240: ip netns exec $h1 ping -c5 1.0.2.4 >/dev/null 2>&1 ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: ip netns exec "$h1" ping -c5 1.0.2.4 >/dev/null 2>&1 In traceroute.sh line 252: run_cmd $h1 "traceroute 1.0.2.4 | grep -q 1.0.1.1" ^-^ SC2086 (info): Double quote to prevent globbing and word splitting. Did you mean: run_cmd "$h1" "traceroute 1.0.2.4 | grep -q 1.0.1.1" In traceroute.sh line 275: v) VERBOSE=$(($VERBOSE + 1));; ^------^ SC2004 (style): $/${} is unnecessary on arithmetic variables. For more information: https://www.shellcheck.net/wiki/SC2154 -- h1 is referenced but not assigned. 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...