Quoting Viktor Lazlo <[EMAIL PROTECTED]>:
>
> 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message