This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

separating cygcheck -f package name from version


I want to be able to extract a package's name from its version
information output by cygcheck -f. For many packages it is 
easy: just strip off after the first hyphen; for example:

$ cygcheck -f /usr/bin/find
findutils-4.6.0-1
$ cygcheck -f /usr/bin/find | cut -d- -f1
findutils
$

But, then there are cases where both the package name and the
version have multiple hyphens:

$ cygcheck -f /usr/share/man/man3p/wcstoimax.3p
man-pages-posix-2013-a-1
$ cygcheck -c man-pages-posix
Cygwin Package Information
Package              Version        Status
man-pages-posix      2013-a-1       OK
$

So, looking for ideas how best to do this.

--Ken Nellis

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]