awk question

Noel Jones noeldude at gmail.com
Mon Mar 6 21:45:49 UTC 2006


On 3/6/06, Bart Silverstrim <bsilverstrim at 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


More information about the freebsd-questions mailing list