On Wed, May 17, 2000 at 01:38:19PM +1000, Matthew Dalton wrote:
>
>
> "A. Scott White" wrote:
> >
> > Can anyone tell me exactly what this line accomplishes:
> >
> > [ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
>
> if the $GATEWAY variable has been set, run the command 'route add
> default gw ${GATEWAY} metric 1.
>
> The [ and ] are synonyms for the 'test' program. In this case, if
> $GATEWAY is set, test returns 1, otherwise it returns 0. The return
you got that backwords, when $GATEWAY is set `test' returns 0 not 1.
0 == success
1 == failure
to the original poster, reply & change subject != new message
the former screws up threading in mailing list archives and in MUAs
such as mutt. please always create a new message and paste the list
address in instead of using reply as a shortcut, or if you post often
create an alias/address book entry for the list address. thank you.
--
Ethan Benson
http://www.alaska.net/~erbenson/
Attachment:
pgp1_315Wrf1q.pgp
Description: PGP signature