I want to know the path of apxs provided by httpd-devel, on a machine that might have other copies of apxs, that would be resolved by which first. I can be reasonably confident this command will work:rpm -ql httpd-devel | egrep 's?bin/apxs2?$'However, is there a way to test without piping through grep and regex?
Looking for the path of a particular file provided by a particular rpm in a spec
rpm
That's the unix way to do it - piping output from one program to another in order to use small buildin blocks to achieve what you need.