case "${proto}" in "ipv6") cmd="ping6" ;; "arp") cmd="arping" ;; *) cmd="ping" ;; esac if test "${proto}" != "arp"; then # Resolve names if test -z "${resolve}"; then cmd=$cmd" -n" fi # Ping broadcast cmd=$cmd"`expr substr '${ -b :broadcast}' 1 3`" # Packet size cmd=$cmd"${ -s :psize}" # Interval between packets if test -n "${period}"; then cmd=$cmd"${ -i :period}" else cmd=$cmd" -i 1" fi # Flood ping cmd=$cmd"`expr substr '${ -f :flood}' 1 3`" else # Detect MAC duplicate cmd=$cmd"`expr substr '${ -D :duplicate-detect}' 1 3`" fi # Interface or address cmd=$cmd"${ -I :src}" # Request count if test -z "${count}"; then cmd=$cmd" -c 5" else cmd=$cmd"${ -c :count}" fi # cmd=$cmd" ${dst}" $cmd if test -n "${ipv6}"; then cmd="traceroute6" else cmd="traceroute" fi #Resolve names if test -z "${resolve}"; then cmd=$cmd" -n" fi # Source address cmd=$cmd"${ -s :src}" # Source interface cmd=$cmd"${ -i :if}" # cmd=$cmd" ${dst}" $cmd