im new to shell scripting

i want a simle script to configure the ip adress and add a default gw

this is what i got so far

    ifconfig eth0 "ipadress" 
    route add default gw "gw adress"

it does not recognise route ? can anyone help?

What shows when you type

route -n

after running your script?

I have used the following before



ifconfig eth0 inet $IP netmask
route add default gw $ROUTE

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.