From owner-freebsd-questions@FreeBSD.ORG Thu Jul 1 23:43:59 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D892D106566B for ; Thu, 1 Jul 2010 23:43:59 +0000 (UTC) (envelope-from aiza21@comclark.com) Received: from avmxsmtp3.comclark.com (avmxsmtp3.comclark.com [202.69.191.117]) by mx1.freebsd.org (Postfix) with ESMTP id 768828FC0C for ; Thu, 1 Jul 2010 23:43:59 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgoXAB/FLEzKRa3YOWdsb2JhbAAHh2eYDQEBAQE0ASe/GYUlBINvhm4 X-IronPort-AV: E=Sophos;i="4.53,523,1272816000"; d="scan'208";a="6804995" Received: from unknown (HELO [10.0.10.3]) ([202.69.173.216]) by avmxsmtp3.comclark.com with ESMTP; 02 Jul 2010 07:43:56 +0800 Message-ID: <4C2D2839.3040909@comclark.com> Date: Fri, 02 Jul 2010 07:43:53 +0800 From: Aiza User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: "questions@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Bourne .sh ? 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: Thu, 01 Jul 2010 23:43:59 -0000 I have a file containing this drwxrwxr-x 14 89987 546 512 Jun 6 2009 7.2-RELEASE drwxrwxr-x 14 89987 546 512 Mar 23 04:59 7.3-RELEASE drwxrwxr-x 13 89987 546 512 Nov 23 2009 8.0-RELEASE drwxrwxr-x 13 89987 546 512 Jul 1 04:56 8.1-RC2 I want to strip off everything to the left of the release version so I end up with this. 7.2-RELEASE 7.3-RELEASE 8.0-RELEASE 8.1-RC2 How would I code to do this?