[lug] Calculating network addresses
Ian Hall-Beyer
manuka at nerdherd.net
Wed Mar 8 11:32:02 MST 2000
On Wed, 8 Mar 2000, winrip wrote:
> Yet I still believe the fastest way is to AND it by hand. You could get the
> answer in half the time it takes to write a perl script or program. But maybe I
> like doing things the hard way.
The quick and dirty way to do it in bash, I've found is to grep the output
of route -nfor the interface name, then grep again for the netmask. The
first field is your network address.
-Ian
--
<cosmo> wow, this is kinda nifty. the win98 protocol stack is
like a chinese finger puzzle, twist and turn in the right places,
and it pops right off --Seen on EFNet IRC
More information about the LUG
mailing list