a small scripting question

david nux at blueyonder.co.uk
Fri Apr 1 16:05:15 UTC 2005


On Fri, 2005-04-01 at 16:46 +0100, Jonathan McLoughlin wrote:
> route statements look OK
> Why do you need a 'fi' without an if statement?
> 
> david wrote:
> 
> >Is the following a valid script?
> >
> >#! /bin/sh
> >   route add -host 192.168.129.1 usbd0
> >   route delete -net 192.168.129.0/24 usbd0
> >   route add default gw 192.168.129.1
> >fi
> >
> >If I save this and make it executable and put it in the appropriate rc.x
> >folder will it work? (This is for my zaurus not for my Ubuntu box).
> >
> >Many thanks
> >
> >David
> >

Thanks for all the replies.

I've never done a script before and was looking through other scripts to
get an idea. Consequently I misunderstood the "fi" part.

Thanks again.

David





More information about the ubuntu-users mailing list