From owner-freebsd-questions Wed May 24 12: 5: 2 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 56EC237BD57 for ; Wed, 24 May 2000 12:04:58 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id OAA16886; Wed, 24 May 2000 14:04:48 -0500 (CDT) (envelope-from dan) Date: Wed, 24 May 2000 14:04:48 -0500 From: Dan Nelson To: "TEMPLE, MATTHEW (LNG)" Cc: "'freebsd-questions@freebsd.org'" Subject: Re: uuidgen or other GUID-generating utility Message-ID: <20000524140448.A15434@dan.emsphone.com> References: <27E4B476932BD211945B00805FE67AF5089DE1D9@lnxdayexch05.lexis-nexis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <27E4B476932BD211945B00805FE67AF5089DE1D9@lnxdayexch05.lexis-nexis.com>; from "TEMPLE, MATTHEW (LNG)" on Wed May 24 13:58:20 GMT 2000 X-OS: FreeBSD 5.0-CURRENT Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (May 24), TEMPLE, MATTHEW (LNG) said: > I need a globally unique ID, like 28eea00e-a872-491e-8848-a9b8daf3314b. > Linux and Solaris have a utility called uuidgen that spits them out. Solaris doesn't have anything like that (on 2.6 at least), and Linux's uuidgen simply generates a random string. This should do what you want: printf "%s%s-%s-%s-%s-%s%s%s\n" `jot -r -w "%04x" 8 0 65536` -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message