Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Mar 2006 15:45:47 -0600
From:      "Noel Jones" <noeldude@gmail.com>
To:        "freebsd-questions Questions list" <freebsd-questions@freebsd.org>
Subject:   Re: awk question
Message-ID:  <cce506b0603061345n4de96301sd9b8a8dd17deeac1@mail.gmail.com>
In-Reply-To: <75a11e816bee8f2664ae1ccbd618dca7@athensasd.org>
References:  <75a11e816bee8f2664ae1ccbd618dca7@athensasd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3/6/06, Bart Silverstrim <bsilverstrim@athensasd.org> wrote:
> I'm totally drawing a blank on where to start out on this.
>
> If I have a list of URLs like
> http://www.happymountain.com/archive/digest.gif
>
> How could I use Awk or Sed to strip everything after the .com?  Or is
> there a "better" way to do it?  I'd like to just pipe the information
> from the logs to this mini-script and end up with a list of URLs
> consisting of just the domain (http://www.happymountain.com).
>


    | cut -d / -f 1-3

--
Noel Jones



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