Re: cut



virus.clear.net.nz wrote:

If I have a listing of packages,
such as : -

XML-Parser-2.34.tbz2
bin86-0.16.17.tbz2
libxml2-2.6.26.tbz2 system-tools-backends-1.4.2.tbz2

I want to cut the version number from the listing, leaving only bin86, libxml2, etc.
I think that cutting a "-" followed by a {0-9} achieve this ??? but cut only allows for a single delimiter.

How to achieve this ?

It sounds like just:

cut -d- -f1

would do what you want, but I assume there's more to it than you've explained so far, so perhaps some small, concrete sample input and expected output would help.

Ed.
.



Relevant Pages

  • Re: cut
    ... I want to cut the version number from the listing, leaving only bin86, libxml2, etc. ...
    (comp.unix.shell)
  • Re: cut
    ... I want to cut the version number from the listing, leaving only bin86, ... libxml2, etc. ...
    (comp.unix.shell)
  • Re: cut
    ... I want to cut the version number from the listing, leaving only bin86, libxml2, etc. ... I think that cutting a "-" followed by a achieve this ??? ...
    (comp.unix.shell)
  • Re: Ponitless Lists, #437
    ... about the Thames the success it was by cutting all the travel bits, ... leaving only the humorous anecdotes that the author had included. ...
    (uk.misc)
  • Re: Webber gets webbered again
    ... I disagree - there was no excuse for leaving his fast run so ... Got what he deserved IMO. ... He wasn't really cutting it that fine. ...
    (rec.autos.sport.f1)