Andy Green wrote:
Mike McCarty wrote:
if [ -z "`echo $pkg | grep not\ owned`" ] ; then
I'm not familiar with that form for grep. Do you mean
grep -v owned
Nope.
Oh, of course, you were escaping the space. But isn't this
still defective? If "not owned" is present, then grep finds
it, and the test fails, doesn't it? Don't you still need
grep -v not\ owned
?
Anyway, this still has a defect. If there is a package
with the string "owned" in its name, and it is the
only dependency, then this fails. See my other message
for a better solution.
Well, thanks for that ;-)
You're welcome. It is a better solution, IMO. If the "not
owned" string gets changed by the maintainers of rpm,
then you'll have to track that. The "--quiet" is unlikely
to change, I think, and results in less coupling.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!