[Gllug] "ip" command
Russell Howe
rhowe at siksai.co.uk
Fri Feb 3 16:52:22 UTC 2006
On Fri, Feb 03, 2006 at 04:32:24PM +0000, Anthony Newman wrote:
> I'll meet your ugly shell hack, and raise you:
>
> echo "172.168.2.0/255.255.254.0" | perl -MNet::Netmask -pe 's/$_/new
> Net::Netmask($_)/e;'
>
> 172.168.2.0/23
The device in question didn't have perl, and even my web server box
doesn't have the required perl module for the above to work :)
I also had a version which was just a big switch statement with all 32
CIDR netmasks
--
Russell Howe | Why be just another cog in the machine,
rhowe at siksai.co.uk | when you can be the spanner in the works?
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list