Re: cut
- From: Ed Morton <morton@xxxxxxxxxxxxxx>
- Date: Fri, 27 Oct 2006 15:04:10 -0500
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.
.
- Follow-Ups:
- Re: cut
- From: Janis Papanagnou
- Re: cut
- References:
- cut
- From: virus.clear.net.nz
- cut
- Prev by Date: Re: scripting help
- Next by Date: manipulating PS1 in sh
- Previous by thread: cut
- Next by thread: Re: cut
- Index(es):
Relevant Pages
|