in reply to Re^7: Capture::Tiny getting stuck on ldd /proc/self/fd/1
in thread Capture::Tiny getting stuck on ldd /proc/self/fd/1

I see. Under info I find bash,zlib,libzio which should not be ignored. Now that I'm using this command, I don't need the libraries right (because you mentioned ". It provides no libraries")? I just need to find all the packages.
Also, I want to make it run automatically. So I need some logic on how to parse the output of rpm -q --requires $pkg. I gave grep as an example so it will be easier to talk about the strategy on how to parse this output. I guess I can exclude the rpmlib lines. For the libc.so.6, do I need to run locate to find the location and then run the rpm -qf --queryformat "[%{NAME}]" $lib command? What about /bin/sh?

To sum up - What is the strategy in general case, on parsing the output of rpm -q --requires?