* Charles Steinkuehler ([EMAIL PROTECTED]) wrote:
> > I am going to try to do this. I think I am mostly done. Any advice on
> getting
> > rid of the "expr" commands that are doing math?
>
> See the ash/bash man page. You can do simple math with $(( )) expansion
> (add, sub, multiply, divide),
> I am going to try to do this. I think I am mostly done. Any advice on
getting
> rid of the "expr" commands that are doing math?
See the ash/bash man page. You can do simple math with $(( )) expansion
(add, sub, multiply, divide), although numbers are limited in range...ie:
echo "2 + 2 = $((
* Charles Steinkuehler ([EMAIL PROTECTED]) wrote:
> Awk is another beast altogether. Awk isn't really required on a LEAF box,
> so if you can get the ipsec stuff running without it, that would be pretty
> cool. Looks like a lot of work, though.
You are right. Too much work, I'm afraid. And si
> Please excuse me. Somehow, in a flurry of trying to get up-to-date on
emails,
> I lost this thread almost entirely.
>
> What you said was something like ifconfig, route and netstat should be on
any
> router, but can't each of those programs be replaced by iproute2? If so,
isn't
> the interface
* Charles Steinkuehler ([EMAIL PROTECTED]) wrote:
> Any particular reason you're trying to get rid of ifconfig and awk? Care to
> share what you're working on with the class?
Please excuse me. Somehow, in a flurry of trying to get up-to-date on emails,
I lost this thread almost entirely.
What
> # get the physical device that leads to the default gateway
> netstat -nr | awk '$1 == "0.0.0.0" && $3 == "0.0.0.0" { print $NF }'
> # becomes this without netstat or awk
> ip route | sed -e '/^default/!d' -e 's/^.* ([^ ]*) $/\1/'
This seems OK, although it prints multiple lines if you've got m