From owner-freebsd-questions Sun Mar 9 19:48:56 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 54C0237B401 for ; Sun, 9 Mar 2003 19:48:55 -0800 (PST) Received: from ra.dweebsoft.com (ra.dweebsoft.com [209.237.40.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id A8C5F43FBD for ; Sun, 9 Mar 2003 19:48:54 -0800 (PST) (envelope-from daxbert_news@dweebsoft.com) Received: from ra.dweebsoft.com (localhost [127.0.0.1]) by ra.dweebsoft.com (8.12.6/8.12.6) with ESMTP id h2A3msj6005149; Sun, 9 Mar 2003 19:48:54 -0800 (PST) (envelope-from daxbert_news@dweebsoft.com) Received: (from http@localhost) by ra.dweebsoft.com (8.12.6/8.12.3/Submit) id h2A3mspF005148; Sun, 9 Mar 2003 19:48:54 -0800 (PST) X-Authentication-Warning: ra.dweebsoft.com: http set sender to daxbert_news@dweebsoft.com using -f Received: from 64.81.58.36 ( [64.81.58.36]) as user daxbert@localhost by ra.dweebsoft.com with HTTP; Sun, 9 Mar 2003 19:48:54 -0800 Message-ID: <1047268134.3e6c0b263d124@ra.dweebsoft.com> Date: Sun, 9 Mar 2003 19:48:54 -0800 From: Daxbert To: David Banning Cc: "" Subject: Re: identifying my network address MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1 X-Originating-IP: 64.81.58.36 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 Quoting David Banning : > I am running an Xwindow on a windows box. I need a script to > tell me what my network address is so that I can set my DISPLAY > varible correctly eg: 192.168.1.2:0.0 > > Any idea what command would be useful for this purpose? > DISPLAY=`who -m | awk '{print $6}' | sed -e 's/[(|)]//g'`:0.0 give that a shot... I'm sure there's a shorter, cleaner way...but it works. --daxbert To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message