Skip site navigation (1)Skip section navigation (2)
Date:      Sun,  9 Mar 2003 23:45:18 -0800
From:      Daxbert <daxbert_news@dweebsoft.com>
To:        Viktor Lazlo <viktorlazlo@telus.net>
Cc:        David Banning <david@skytrackercanada.com>, "" <questions@FreeBSD.ORG>
Subject:   Re: identifying my network address
Message-ID:  <1047282318.3e6c428ee6e63@ra.dweebsoft.com>

next in thread | raw e-mail | index | archive | help
Quoting Viktor Lazlo <viktorlazlo@telus.net>:

> 
> On Sun, 9 Mar 2003, Daxbert wrote:
> 
> > DISPLAY=`who -m | awk '{print $6}' | sed -e 's/[(|)]//g'`:0.0
> >
> > 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" }'
> 

I used sed to remove the leading and trailing '(' ')' from around the hostname/ip.

They do need to be removed, right?

--dax

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?1047282318.3e6c428ee6e63>