From owner-freebsd-questions@FreeBSD.ORG Mon Mar 6 20:58:42 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB48616A420 for ; Mon, 6 Mar 2006 20:58:42 +0000 (GMT) (envelope-from bsilverstrim@athensasd.org) Received: from mail.athensasd.k12.pa.us (rrcs-24-97-187-226.nys.biz.rr.com [24.97.187.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8ABFE43D45 for ; Mon, 6 Mar 2006 20:58:40 +0000 (GMT) (envelope-from bsilverstrim@athensasd.org) Received: from [127.0.0.1] ([172.16.0.190]) by mail.athensasd.k12.pa.us with Microsoft SMTPSVC(5.0.2195.6713); Mon, 6 Mar 2006 15:58:39 -0500 Mime-Version: 1.0 (Apple Message framework v623) Content-Transfer-Encoding: 7bit Message-Id: <75a11e816bee8f2664ae1ccbd618dca7@athensasd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed To: freebsd-questions Questions list From: Bart Silverstrim Date: Mon, 6 Mar 2006 15:58:42 -0500 X-Mailer: Apple Mail (2.623) X-OriginalArrivalTime: 06 Mar 2006 20:58:39.0323 (UTC) FILETIME=[BE5F72B0:01C64160] Subject: awk question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2006 20:58:43 -0000 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). Any suggestions?