On 03/ 8/11 10:16 AM, Shawn Walker wrote:
On 03/ 8/11 09:10 AM, Rich Burridge wrote:
$ pkg search -r /usr/gnu/bin/basename
INDEX ACTION VALUE PACKAGE
path file usr/gnu/bin/basename pkg:/file/[email protected]
$ pkg search -r /usr/gnu/bin/basename /usr/gnu/bin/cat
$
I was expecting the second one to return two package fmri's, not nothing.
No; pkg search currently does an implicit AND for anything you specify.
The man page could certainly be clearer about that though.
If you wanted to search for actions matching any of those terms, then:
$ pkg search -r /usr/gnu/bin/basename OR /usr/gnu/bin/cat
INDEX ACTION VALUE PACKAGE
path file usr/gnu/bin/basename pkg:/file/[email protected]
path file usr/gnu/bin/cat pkg:/file/[email protected]
If you wanted to search for packages matching any of those terms, then:
# pkg search -r '</usr/gnu/bin/basename> OR </usr/bin/less>'
PACKAGE PUBLISHER
pkg:/file/[email protected] solaris
pkg:/text/[email protected] solaris
If you wanted to search for packages containing a match for all of those
terms (the AND is implicit, but stated here for clarity):
# pkg search -r '</usr/gnu/bin/basename> AND </usr/gnu/bin/cat>'
PACKAGE PUBLISHER
pkg:/file/[email protected] solaris
# pkg search -r '</usr/gnu/bin/basename> AND </usr/bin/less>'
(No results; since no package contains both basename and less.)
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss