From owner-freebsd-questions@FreeBSD.ORG Fri Jul 2 15:24:57 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 D0C5C1065673 for ; Fri, 2 Jul 2010 15:24:57 +0000 (UTC) (envelope-from sterling@camdensoftware.com) Received: from wh2.interactivevillages.com (wh2.interactivevillages.com [75.125.250.34]) by mx1.freebsd.org (Postfix) with ESMTP id 998F78FC08 for ; Fri, 2 Jul 2010 15:24:57 +0000 (UTC) Received: from 174-21-99-21.tukw.qwest.net ([174.21.99.21] helo=_HOSTNAME_) by wh2.interactivevillages.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1OUhx9-000780-8n for questions@freebsd.org; Fri, 02 Jul 2010 08:14:56 -0700 Received: by _HOSTNAME_ (sSMTP sendmail emulation); Fri, 02 Jul 2010 08:24:52 -0700 Date: Fri, 2 Jul 2010 08:24:52 -0700 From: Chip Camden To: "questions@freebsd.org" Message-ID: <20100702152452.GC69135@libertas.local.camdensoftware.com> Mail-Followup-To: "questions@freebsd.org" References: <4C2D2839.3040909@comclark.com> <20100702000124.GG19474@libertas.local.camdensoftware.com> <4C2D5F58.3050708@comclark.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vOmOzSkFvhd7u8Ms" Content-Disposition: inline In-Reply-To: <4C2D5F58.3050708@comclark.com> User-Agent: Mutt/1.4.2.3i Company: Camden Software Consulting URL: http://camdensoftware.com X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - wh2.interactivevillages.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - camdensoftware.com Cc: Subject: Re: 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: Fri, 02 Jul 2010 15:24:57 -0000 --vOmOzSkFvhd7u8Ms Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Jul 02 11:39, Aiza wrote: > Chip Camden wrote: > >On Jul 02 07:43, Aiza wrote: > >>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? > > > >sed -e 's/.* //' < file > > > >assuming there are no trailing spaces on each line. > > > >Another alternative would be to create the list without all that detail: > > > >ls -1 > > >=20 > Wow do I feel stupid. You saw through my question to the underlying=20 > problem causing the need to strip off that stuff. I just changed the=20 > command from ls -l to ls -1 and got what I wanted in the first place. >=20 > Thanks You're welcome. We're all learners here, but the man pages are an excellent resource. --=20 Sterling (Chip) Camden http://camdensoftware.com | http://chipstips.com | http://chipsquips.com --vOmOzSkFvhd7u8Ms Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iQEcBAEBAgAGBQJMLgTEAAoJEIpckszW26+RxxkIAL+u/kwshPf0aVLPIacU4XO8 F3h40AbirrAdnEmen5OnNxFNghHYLpcgbrnE1auAjONjK27ckkh8ILNbhGwQlUlv h9ugmDhiuIyaSNKGgq75R75AZS4wv7q8heqWW7/WZ9v+YWwKlbgb57deKefEOwhj rTXf5hPpo0jBP2UxHC6ap9//qCFYQupa1dZWes/tSSgAW79zXxXdcN04zV2EcFUo apjlJVaWnEU/cTqS0/9Jhm1QDqFjeLhcBKgPA9Zw8Non4T/jJnH3vg0bSrlHjdlP EiqR4tMgEs1dD8BZj4PJ4ixhQrhS19MszfpwhLPjzdKd8k2jw15ek0G8HG+P+rU= =wW2X -----END PGP SIGNATURE----- --vOmOzSkFvhd7u8Ms--