Re: cut



Ed Morton wrote:
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

I suppose he wants the "-Parser" not to be splitted off from "XML-Parser".

Janis

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. ... I think that cutting a "-" followed by a achieve this ??? ...
    (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: WJF video: Vova balls
    ... because his exclusion is humourously insulting, i.e. listing a bunch of people and saying they look pretty and then leaving someone out... ...
    (rec.juggling)
  • Re: Tired of fake keywords in title - get revenge
    ... pack a lunch before you attempt to read that listing. ... Dude has 775 fb's with a 99.2% and he threatens about leaving fb? ...
    (alt.marketing.online.ebay)