2 cd dtneeded.out || exit 1
3 for bin in $(grep -rl ' (DEBUG) ' .);do
4 sed -n 's/^ *0x0000000000000001 *(NEEDED) *Shared library: \[\(.*\)\]$/\1/p' <$bin
5 rpath="$(sed -n 's/^.*(R\(\|UN\)PATH) *Library r\(\|un\)path: \[\(.*\)\]$/\1/p' <$bin):."
6 rpath="$(echo "$rpath"|sed 's#[$]ORIGIN#'"$(dirname $bin)"'#g')"