应用层修改ifconfig命令

if [ $# = 0 ];then
        ifconfig | head -n 18
elif [ $# = 1 ];then
        if [ $1 == "-v" ] || [ $1 == "-a" ] ;then
                 ifconfig | head -n 18
        else
                 ifconfig $1
        fi
else
        ifconfig $@
fi

编程技巧