How to view all ssl certificates in a bundle?

This morning I got a problem with a certificate bundle and how to get single certificate inside it.
I found the answer on ServerFault (link).

# openssl crl2pkcs7 -nocrl -certfile bundle.crt | openssl pkcs7 -print_certs -text -noout


Sed Quick Reference

Basic sed usage

Add "-dev" at the end of the match.
# sed -i 's|saml[1-2]-.*\.php/[a-zA-Z0-9\-]*|&-dev|