Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Mar 2003 23:31:16 -0800 (PST)
From:      Viktor Lazlo <viktorlazlo@telus.net>
To:        Daxbert <daxbert_news@dweebsoft.com>
Cc:        David Banning <david@skytrackercanada.com>, <questions@FreeBSD.ORG>
Subject:   Re: identifying my network address
Message-ID:  <20030309232840.X20073-100000@a3ij25fvy80j.bc.hsia.telus.net>
In-Reply-To: <1047268134.3e6c0b263d124@ra.dweebsoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On Sun, 9 Mar 2003, Daxbert wrote:

> 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.

Since you're using awk anyways why not eliminate piping through sed:

DISPLAY=`who -m | awk '{ print $6":0.0" }'

Cheers,

Viktor


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030309232840.X20073-100000>