Bourne .sh ?
Chip Camden
sterling at camdensoftware.com
Fri Jul 2 15:24:57 UTC 2010
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
> >
>
> Wow do I feel stupid. You saw through my question to the underlying
> problem causing the need to strip off that stuff. I just changed the
> command from ls -l to ls -1 and got what I wanted in the first place.
>
> Thanks
You're welcome. We're all learners here, but the man pages are an
excellent resource.
--
Sterling (Chip) Camden
http://camdensoftware.com | http://chipstips.com | http://chipsquips.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100702/ec884d70/attachment.pgp
More information about the freebsd-questions
mailing list