From owner-freebsd-questions Thu Jun 6 21: 8:16 2002 Delivered-To: freebsd-questions@freebsd.org Received: from smtp2.mbox.com.au (203-134-146-019.cust.pth.iprimus.net.au [203.134.146.19]) by hub.freebsd.org (Postfix) with ESMTP id 05FBB37B412 for ; Thu, 6 Jun 2002 21:08:11 -0700 (PDT) Received: from nms2.mbox.com.au (webmail.mbox.com.au [192.168.20.4]) by smtp2.mbox.com.au (Sun Internet Mail Server sims.4.0.2000.05.17.04.13.p6) with ESMTP id <0GXB00I73HWNV4@smtp2.mbox.com.au> for freebsd-questions@FreeBSD.ORG; Fri, 7 Jun 2002 12:02:47 +0800 (WST) Received: from mbox.com.au ([127.0.0.1]) by nms2.mbox.com.au (Netscape Messaging Server 4.15) with ESMTP id GXBHZR00.LFF for ; Fri, 07 Jun 2002 12:04:39 +0800 Date: Fri, 07 Jun 2002 14:04:39 +1000 From: BSD Freak Subject: Converting decimal dotted subnet mask to CIDR in a script To: FreeBSD Questions Message-id: MIME-version: 1.0 X-Mailer: Netscape Webmail Content-type: text/plain; charset=us-ascii Content-language: en Content-disposition: inline Content-transfer-encoding: 7BIT X-Accept-Language: en Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi all, I have a variable in a script we use $MASK=255.255.255.0 Is there a utility or an easy way to process $MASK and get $MASKCIDR=24 the CIDR value of 255.255.255.0 Many thanks... --------------------------------------------------------------------- Faxes delivered directly to any email address, new to mBox! Find out more http://www.mbox.com.au/fax To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message