Date: Fri, 2 Jul 2010 08:24:52 -0700 From: Chip Camden <sterling@camdensoftware.com> To: "questions@freebsd.org" <questions@freebsd.org> Subject: Re: Bourne .sh ? Message-ID: <20100702152452.GC69135@libertas.local.camdensoftware.com> In-Reply-To: <4C2D5F58.3050708@comclark.com> References: <4C2D2839.3040909@comclark.com> <20100702000124.GG19474@libertas.local.camdensoftware.com> <4C2D5F58.3050708@comclark.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100702152452.GC69135>