小编Man*_*tel的帖子

'\ r':找不到命令

echo "Select your option:"
echo "1. Change ip address"
echo "2. Add route"
echo "3. Reboot"
echo "4. Exit"
read A
case $A in
    1)
            echo "Add Ip address"
            read IP
            echo "Add Netmask"
            read Netid
            echo "Add name of interface"
            read Interface
            ifconfig ${Interface} ${IP}/${Netid}
            if [ $? -ne 0 ];then
                    echo "Ip address not configured"
            fi
            ;;
    2)
            echo "Add Destination"
            read dst
            echo "Add Netmask"
            read Netid
            echo "Add Gateway"
            read gw
            route add $dst mask $Netid …
Run Code Online (Sandbox Code Playgroud)

shell

19
推荐指数
3
解决办法
7万
查看次数

标签 统计

shell ×1