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

Also two entries on one line possible?

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 ?

thanks

Grant

For one entry on each line...

sed 's/-[0-9].*//'


Janis
.



Relevant Pages

  • 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)