From owner-freebsd-questions@FreeBSD.ORG Sat Aug 3 12:04:27 2013 Return-Path: Delivered-To: questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 69DC3B7C for ; Sat, 3 Aug 2013 12:04:27 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from smtp.rcn.com (smtp.rcn.com [69.168.97.78]) by mx1.freebsd.org (Postfix) with ESMTP id 327A920C5 for ; Sat, 3 Aug 2013 12:04:26 +0000 (UTC) X_CMAE_Category: 0,0 Undefined,Undefined X-CNFS-Analysis: v=2.1 cv=IO07VGfG c=1 sm=0 tr=0 a=nVny9ETX7T5uMhI2oTVyRA==:117 a=nVny9ETX7T5uMhI2oTVyRA==:17 a=K-v-2zaBAAAA:8 a=v6UVC9kNpZcA:10 a=AaUjGI9IrlcA:10 a=kj9zAlcOel0A:10 a=OA2lqS22AAAA:8 a=sIt-5M63AAAA:8 a=7eOdkc0L9ToA:10 a=9LOgCDU5KqfWOZUXnNQA:9 a=CjuIK1q_8ugA:10 a=uugeGtt4FLoA:10 a=6KXi-4-EGdoA:10 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Authentication-Results: smtp01.rcn.cmh.synacor.com smtp.mail=roberthuff@rcn.com; spf=neutral; sender-id=neutral Authentication-Results: smtp01.rcn.cmh.synacor.com header.from=roberthuff@rcn.com; sender-id=neutral Received-SPF: neutral (smtp01.rcn.cmh.synacor.com: 209.6.193.164 is neither permitted nor denied by domain of rcn.com) Received: from [209.6.193.164] ([209.6.193.164:25037] helo=jerusalem.litteratus.org.litteratus.org) by smtp.rcn.com (envelope-from ) (ecelerity 2.2.3.49 r(42060/42061)) with ESMTP id 13/0F-04066-9C1FCF15; Sat, 03 Aug 2013 08:04:26 -0400 From: Robert Huff MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <20988.61897.78070.312049@jerusalem.litteratus.org> Date: Sat, 3 Aug 2013 08:04:25 -0400 To: Fbsd8 Subject: .sh script code to determine IPv4 or IPv6 In-Reply-To: <51FCE9C7.7020407@a1poweruser.com> References: <51FCE9C7.7020407@a1poweruser.com> X-Mailer: VM 7.17 under 21.4 (patch 22) "Instant Classic" XEmacs Lucid Cc: questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 12:04:27 -0000 Fbsd8 writes: > I have a .sh script that I need to determine if the entered IP > address is IPv4 or IPv6. > > Is there some .sh command that does this? Not that I know of. But ... how hard can it be to figure out whether it uses '.' or ':'? Robert Huff