The other day I found myself wanting to know which pattern(s) some
packages are included in. This is what I came up with (where the package
I want to know about is gnome-web-photo)

$ for i in $(zypper patterns | grep [::alpha::] | grep -v Repository | cut -d '|' -f 2); do test -n "$(zypper info -t pattern $i | grep gnome-web-photo )" && echo $i;done

Which works but, well look at it
I've been unable to improve on it. Can anyone come up with a less
convoluted way of doing it?

mikewillis's Profile:
View this thread: